Ray tracing is the art of tracing rays and detecting collision.
Ray tracing is used in photon mapping and path tracing.
With photon mapping you trace a ray from a light source and store the light energy for the area where the light hits an object.
With path tracing you ray trace a ray from the camera and every time you hit an object you check if you can see a light source from that spot. If true you return all the gathered energy back to the camera (pixel).