What is a line segment?
A line is a straight set of point that extends in both directions without ending. A line segment is part of a line bounded by two endpoints, and contains every point on the line between its endpoints.
In special cases, when the endpoints are both vertices of a polygon, the line segment is either an edge of that polygon, or a diagonal. Similarly, when the end points both lie on a curve such as a circle, the line segment is called a chord of that curve.
In the attached figure, AB is a line segment, CD is a chord of the circle, PQ is an edge and PS is a diagonal of the hexagon.
Line is the path described by a moving point. A straight line segment is formed when we use a ruler to join 2 points, example A and B. This line segment is called AB or BA. A and B are the end points of this line segment. I've attached a diagram below showing line segment AB.