Before I go to raytracing let me just talk about some basic physics known as optics, which on the fundamental level says we see objects when light bounces of the object surfaces or object themselves produce light and reaches our eyes
Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. This technique is capable of producing hyper realistic visuals compared to regular scanline rendering methods. Ray tracing is capable of simulating a wide variety of optical effects, such as reflection and refraction, scattering, and dispersion phenomena.
The basic idea of ray tracing is to care only about the rays that hit our eyes directly or after some re-bounce, also the generated images will be grids of pixels with limited resolution.