In a photo, the range of distance that looks nice and sharp or in focus is the depth of field. Using depth of field adds layers to your photo and can make it seem more three dimensional. It can also draw your eye to certain things about a photo.
A shallow depth of field creates isolation between the subject and background. You should us a shallower depth of field if you was to take a portrait or other times when you want the subject to be isolated from the backround.
A deeper depth of field keeps the entire more of the photo in focus. A larger depth of field should be used when taking photos of landscapes or group pictures.
These pictures were taken at the same distance but changing the aperture each time to bring the background more into focus in eacch photo.








I took these pictures with the same aperture but I stepped back a few feet in between each shot.





These photos were all taken with a small depth of field.










This image is my favorite one in the depth of field post. I like the way he is looking back and how the background blurred but you can still tell that it is a hallway.