The line is known to be something that will keep ongoing. It will have no endpoints, and people can just decide when they would like the line to stop. A line segment is similar to a line, but it seems to have been removed from the line itself because it has two endpoints.
Usually, when people draw lines, they do not add anything on both ends to signify that it can keep on going in both directions for as long as it wants. When a line segment is drawn, it will usually have a shape located at each end to ensure that there are two ends for this.