The top frame of the image below shows an image formed on the screen (at right) of an object (pencil on the left) located at some distance $D$ from the lens. The lens focuses all the light rays hitting it from the top of the pencil onto the corresponding point on the screen.
The bottom frame shows the same setup, except with the top of the pencil missing. The point on the screen which previously had only light rays from the top of the pencil impinging on it, now has rays from other points to the left of the pencil (for instance, the triangle,square,circle, etc.) hitting it. Those points are all completely different light sources (different frequency, phase, etc.), their combination at the screen will not be coherent or of any single frequency.
This means that a lens focused on an object a distance $D$ from it (to photograph the bottom half of the pencil), should show make a screen image with the bottom half of the pencil sharp, but anything behind its (missing) top half completely blurry.
But then how come in reality, when we take regular photographs, even though we set the focus to capture an object some specific distance away, the objects (not too far) behind it still come out mostly properly (correct colors) and sharply? In other words, how come it is almost never the case that when we focus a camera or our eyes on some object, everything else in front or behind it is blurry?