Depth-of-field (DOF) depends on several variables, primarily on aperture and on your distance from your subject (physically and/or optically).
Your lens is your camera’s eye, the aperture is its pupil. The larger the aperture is (the smaller the f/stop number is) the smaller DOF becomes. If you’re ever in doubt, relax: the largest aperture that your lens has is engraved on it. A large aperture size is good news: on the technical side, it means that your lens is capable of letting in lots of light, enabling you to do low-light photography. And as for the aesthetic aspect: a large aperture allows you to take pictures with shallow (or narrow, small) DOF where the foreground and the background of your picture are clearly separated from each other by large amounts of blur.
Small apertures (the higher f/stop numbers), on the other hand, increase DOF. Use them to have much, most or all of your scene in focus.
A simple (non-scientific) way to remember what the aperture does:
Large aperture = Lots of blur
Small aperture = Little blur
An alternative way to remember it (in case you want to concentrate on your aperture numbers):
Small number = Small depth-of-field
Large number = Large depth-of-field
Here are a few images to illustrate this. Watch how DOF grows as the aperture becomes smaller and smaller. At the beginning DOF is so extremely shallow that out-of-focus elements of the image can hardly be seen. As DOF increases they gradually ‘reappear’ and come into focus. (And also realize how these images also make use of the second variable: the dummies are very close to the camera.)
And here are the same images as a movie.
The second major variable of DOF is subject distance. When you focus on an object that’s close to you, DOF becomes very small. When you focus on a distant object, DOF is large. Just remember: for your ‘normal’ focal lengths (24-35-50mm lenses) close means indeed close: 3-5 feet or even an arm’s length. A subject that’s 6 feet from you is, in this photographic sense, already far away.
As photographers we have two ways of moving close to or away from our subjects. We can do it physically or optically by zooming in or out. The two are not the same but for our purposes they are very similar.
So, a wide-angle lens that you’d typically use for landscape or architecture photography will, by its very ‘nature’ give you large depth-of-field. When you use such a lens, objects appear much smaller in your viewfinder than to the naked eye. In other words: you are optically very ‘far’ away from them.
A long telephoto lens that you’d use for wildlife or sports photography does exactly the opposite. The very purpose of its long focal length is to give you lots of magnification, to ‘bring’ distant objects closer to you. As these objects will appear to be close to you, DOF is small.