It is a heavily parallelised computation that leverages CUDA cores in NVIDIA GPUs (and compute units on AMD). This has been around since the genesis of video games, with some revolutionary improvements over the years in the form of Physx, Hairworks, and Temporal Anti-Aliasing (TAA).
Here, shaders must be compiled whether at runtime or pre-compiled (latter more common at least on titles ported to PC from Playstation recently) for every lighting that can occur in the game, then those shaders would be combined with the textures to render the final image on screen. One, the old rasterized image rendering way, where most of the improvements have been on shadows, ambient occlusion, and anti-aliasing.
Video game graphics have evolved over the years in two distinct directions. Here are a few screenshots from a game released in 2022, running at 1440p 60 fps on a GTX 1070 Ti: If you have a 70 and above model of GTX 900/ 10 series GPU (or even a 5700 XT or so from AMD), congratulations! You are one of the few old hardware owners who can still run many latest games at 60 fps albeit with a few tweaks or compromises.