The end lines, also known as bylines, run along the short end of the pitch. The goal lines overlap a section of the end lines where the goals sit in between the posts. The ball must go be hit beyond the goal line and into the net for a goal to count. The goal lines are not considered part of the boundary lines.
Any time the ball crosses completely over the boundary lines, play is temporarily stopped. The Assistant Referee will wave his flag and determine which team gets possession of the ball. Once a team claims possession, a throw in, corner kick, or goal kick will take place based on which part of the boundary lines the ball went over. Remember, the last team to touch the ball before it crosses the boundary lines loses possession.
If the ball moves past the touchlines, a throw in will always take place. The team that is awarded possession of the ball performs the throw in. If the ball goes over the end lines, a corner kick or a goal kick will be made to put the ball back into play. It's all based on which team gets possession.
Whichever team touched the ball last and caused it to cross the boundary lines loses possession. The other team gets possession of the ball. Remember, the ball must completely go past the boundary lines to be called out of play.