When you focus a lens you pick a point in the subject to focus on. What you are actually doing is focusing the lens on a plane (or flat surface), not a point. That plane is perfectly parallel to the lens and thus the film or sensor plane. So, every part of the subject that intersects that plane will be in focus. Every other part of the subject will not be in perfect focus.
Unless photographing a flat wall, it is very rare for your subject to be in perfect alignment with your sensor – you subject is most often not flat, and your camera is often at some sort of angle up or down.
Let’s say you are making a portrait. You would typically focus on the persons eyes. Thus, the tip of their nose will be slightly out of focus – its in front of the focal plane – and so will their ears – they are behind the focal plane.
If you are photographing food on a table you may focus on some food item on the plate. Since the camera will be pointed down to compose the scene, the film plane will not be parallel to the food on the plate – the camera is say at 45 degrees – but the plate and table is horizontal. So, the front of the plate will be slightly out of focus, and the back of the plate will be too. This is why food photographers use large format cameras where the lens can be tilted, swung sideways and moved up or down. Its all about manipulating the lens plane, film plane and subject plane so they all intersect, and thus maximising the DOF.
The lesson here is to pay attention to the plane of focus, and where possible arrange the subject and the camera position so that the subject plane and the sensor plane coincide as much as possible.