Photography is all about preparation. Instead of running into problems when you’re out shooting, understand some easy ways of tackling the more common problems you may run into!
As you've seen, a lens can only bring objects at a single distance from the camera into sharp focus. But if you look at photographs, you can see a considerable area of the scene from near to far that appears sharp. Even though theoretically only one narrow plane is critically sharp, other parts of the scene in front of and behind the most sharply focused plane appear acceptably sharp.
Read more and learn about it!
You probably remember seeing photographs where a close subject is very clear and sharp (in focus) while the rest of the background is very blurry (out of focus). Or, photographs where both the close subject, let’s say a flower, and the background which can be some far trees, are clear in the image and in focus. This is happening because of the depth of field. Understanding how the depth of field works in photography is a very important aspect of making good photographs. Controlling the depth of field can help you shoot photographs where your chosen subjects are always clear in the picture, or it can help you achieve an interesting effect by selecting which elements from your photo should remain clear and which blurry.