A line segment is a part of a line that is bounded by two distinct endpoints. Unlike a line, which extends infinitely in both directions, a line segment has a finite length and does not go on forever. Therefore, the correct answer is that a line segment has two endpoints.