In short, what we refer to by the term "lighting" is the interaction of photons from environmental light sources with the materials of the objects in the scene. When visualizing these photon interactions, we can imagine them as either individual photons, or—as is most common—rays. When they hit a surface, they interact with it. An area that is occluded by at least one surface from all the lights in a scene creates a shadow.
In a video game, this translates to the use of lightmaps to represent the interaction of light in a scene with the material of an object, and the use of shadow maps or shadow volumes (for example, using stencil buffering, which was first popularized in the game Doom 3) to represent shadows.