Ray tracing and ray casting are terms often confused.
Ray casting is simply a ray intersecting geometry to get a color or some data at the hit point.
Whereas ray tracing is using rays to simulate light by reflecting, refracting, absorbing etc.
Rays are typically represented by parametric equations typically expressed in equation below.
Where position is the vector position in 3D space where the ray hits, Ray Origin is the ray’s origin,
ray direction is the direction the ray is traveling (usually normalized),
and t is the parameter where you are on the line.
The t value is periodically advanced through the scene till a hit with geometry has occurred.
The t value can either be moved a constant distance or some variable distance determined by the structure which it resides in.
For voxel structures a typical way to advance the t value is the DDA line algorithm.
To more efficiently move the ray, it is also possible to advance the t value through hierarchical structures like octrees, quadtrees, or BVH trees.
Nvidia’s RTX cards build a BVH tree in real-time from a triangle mesh, this is one of the reasons why they can have Gigarays(billions of rays per second)!