Theory:

A line may be a combination of points that extends infinitely in both directions. A line is labelled sort of a line segment with a bidirectional arrow over the label.
output-onlinepngtools (10).png
 
The above figure shows a line \(AB\) and is represented as AB or BA.
Example:
\(100\) metres track is to illustrate the concept of the line. A track may be a line that extends infinitely in both the direction without having a fixed starting and ending point.
as.PNG
When three or more points lie on the same line are called collinear points.
output-onlinepngtools (45).png
 
The above figure shows the collinear points \(A\), \(B\) and \(C\). These points are collinear points because all three points lie on the same line.
Example:
Arrange the more number of cups to validate the concept of the collinear points.
output-onlinepngtools (46).png
A ray is often defined as a straight line that starts from a point and extends indefinitely in one direction.
The starting point that's fixed at one end is termed as a vertex of a ray. Ray is additionally one-dimensional entity as we will move endlessly in one direction alone.
 
output-onlinepngtools (12).png
 
The above figure shows a ray \(AB\) and is represented as AB.
Example:
We have a battery-operated torch on one end of the road and light from the torch (called as a line segment) is travelling in a straight line towards the other direction. Since we don't know the end of that light, we will say that this line segment from a fixed source may be a ray.
output-onlinepngtools (14).png