there are a number of things which can affect depth of field (dof).
in the example below we’ll look at how #3, distance to subject, affects the dof.
below we have two images. in both images the point of focus is on the back of the chair.

mytoesarecold gallery series
if you look at the background, just above the chair, you’ll see a large spruce tree. it is kinda blurry because we’re using a maximum aperture of f2.8. now lets look at what happens when we increase the distance between the camera and our subject, the chair, while keeping the focal length and aperture constant.

mytoesarecold gallery series
now we see that the chair, the large spruce tree, and nearly everything else in the frame for that matter is also in focus.