In soccer, when the defending team last kick the ball and the ball is out of their goal line without scoring a goal being scored, it is called a corner kick for the attacking team. The kick is taken from the corner of the field closest to where it went out.
A goal kick is awarded when a ball passes over the goal line either on the ground or by air and a goal is not scored last touching a player of the attacking team. This is not in line with the question asked.
When one team kicks the ball out of bounds, the opposing team brings the ball back into play. Balls kicked over the endline result in either a corner kick for the attacking team or a goal kick for the defending team.