A ray is part of a line, has one fixed endpoint, and extends infinitely along the line from the endpoint. Opposite math rays are rays with a common endpoint, extending in opposite directions and forming a line.
If we had a line so it extends infinitely in either direction, and I picked an end point somewhere, and I erased everything that extended beyond that end point, what I've just created is a ray. So a ray has one end point and it extends infinitely from that end point.
But how do you label a ray? Well, you start off by saying what is your end point? My end point of this ray is A because that's where it starts, and it extends through point B. So I'm going to label this ray A, B as a line but I only have one arrow. So the arrow is going to be over the B. Because my end point is A and notice I do not have an arrow over the A, which tells the geometry student or the geometry teacher that this ray starts at A and passes through B.
Now, you can also have opposite rays, and opposite rays share a common end point. So if you look at this line right here, containing X, Y and Z where X, Y and Z are all co-linear. We have opposite rays if I pick point Y. So I could say that the ray Y, Z -- so again I'm saying from point Y through point Z. So go YZ, and notice how I level this where the arrow is over the Z because it starts at Y and the opposite one would be the ray starting at Y passing through X. So I could label this as ray YX.
So opposite rays share an end point and rays in general have one end point and extend infinitely from that end point.