A line segment is the shortest line connecting two points on the plane.
A ray is a line obtained by extending one end of a line segment infinitely.
A straight line is a A line obtained by extending both ends of a line segment infinitely.
A straight line has no endpoints and has infinite length. A ray has only one endpoint and has infinite length. A line segment has two endpoints and has finite length.