Depth of field - dof - is the amount of the subject that
appears to be in focus. It is a product of aperture and magnification.
Look at the drawing below
Only objects within the plane of focus are truly sharp - this is the black circle - but objects in front of and behind the subject will become less and less sharp, giving a blurred outline. The distance between the points that are
acceptably sharp behind and in front of the plane of focus is the dof
With a wide aperture (low f number), in the top drawing, you can see that the angle of the light is steep and forms a wide blur at the film/sensor, therefore shallow dof, whereas with the smaller aperture (high f number) in the lower drawing, the rays of light reaching the film/sensor has a much shallower angle, so the blurring is less, hence greater dof.
Generally, dof is 2/3 behind the plane of focus and 1/3 in front, but in close-up the dof is equally distributed.
You will most often see it written that dof relies on the focal length of the lens, but this is incorrect - it depends on magnification. The shutter speed has no effect.