https://en.wikipedia.org/wiki/Polar_coordinate_system#Converting_between_polar_and_Cartesian_coordinateshttps://en.wikipedia.org/wiki/Euclidean_vectorA vector is (x,y) in 2D and (x,y,z) in 3D. Sometimes there's a w component but you can ignore that here.
A ray is two vectors: One indicates a staring position, the other indicates the direction of travel.
A line segment is two vectors, but instead of a starting position and a direction, it's a starting and ending position.
Ray-with-other-object collisions usually solve for "t" which is a number indicating how far along the ray the collision occurs, usually in the form: collisionPoint = rayStartPoint + rayDirection * t
A capsule is a box with circles at each end (in 2D) or a cylinder with spheres at each end (in 3D), or in another way of thinking about it, the surface of all points that are a constant distance away from a line segment inside the capsule. The idea here is that instead of trying to collide your ball with a line, you simultaneously shrink the ball to a point and expand the object-to-collide-with by that radius in all directions, and in certain cases this makes the collision equations simpler to solve. When you expand a line segment by a constant radius in all directions, you get a capsule.
The reason why you could use a capsule in a pong game is that the ball might hit one of the ends of the paddle. If you use a plain two-line-segments test, you will get a collision point that isn't quite where the ball will actually collide. The difference will be more extreme the further from perpendicular the ball is moving with respect to the paddle's surface.