Depth of Field is a critical factor in photography. It is primarily controlled by the aperture of a lens and the distance from the imaging plane to the subject. Depth of Field can be a powerful creative and artistic element in a photograph, especially if the parts of an image that are outside of the DOF are nicely blurred into a creamy blend of colors and nicely formed circles. Remember, more depth of field means more in focus, not less — the blur effect comes from shallow depth of field.
From a technical standpoint, DOF is controlled by the distance to a subject, and the size of the aperture. At great distances, depth of field is large, possibly immense at "hyperfocal" distances. At close distances, depth of field can be quite small, microscopic at extreme macro distances.
When a lens aperture is wide open, it lets in all the light focused by the lens for any given point light source. The light being focused by the lens can be viewed as a "cone" of light that converges to a point. As the aperture is stopped down, the cone of light that reaches the sensor shrinks, making use of more and more direct rays of light. In the case of focused points of light, they become sharper and more defined:
In the case of out of focus points of light, the circle of confusion created by the focused rays of light becomes smaller, as demonstrated by the diagram below. The aperture blocks part of the cone that is projected out of focus on the the imaging plane, reducing the area of the bokeh circle for that particular point of light: