Draw straight lines from the left and right sides of your lens front opening, both through a single point at the subject you are focused on, and then beyond there behind the subject. These lines will be extended inside the camera down to one point on the sensor (or film if it's one of those cameras). Both of these light rays, and every ray in between, converge at that point on the sensor. They all contribute to the accumulated light at that point. For the point at the subject where the rays cross (all in between ones will, too), that subject point fully contributes to the point on the sensor, and not to points nearby (so it will be in focus). But for subjects in front or behind the ray crossing point, the contribution is a mix of different light sources, and they are have light rays that end up at other points on the sensor.
Depth of field is defined as the range in front and behind the subject which is sufficiently in focus to be acceptable. It can actually vary just by enlarging or shrinking the already taken picture (it might look fine on your camera viewer, but look fuzzy as a background on your desktop if the focus was just slightly off).
Imagine you are a tiny microbe on the surface of the sensor, but have eyes and can see. You look at the rear lens opening and will see the subject, maybe inverted or maybe not. But the subjects that are in "perfect focus" will have a single point fill your entire view of the rear opening of the lens. Then as you walk around the sensor, you see different parts of the subject just as the sensor cells would.