So what exactly is Depth of Field? To put it simply, it's the area that appears sharp in your photograph. But how do you control what's in focus, how much is in focus, etc? For that we'll have to get a bit more in depth about it... See what I did there?
All cameras focus on one single point. From that one point there is a surrounding area both in front and behind that still appears acceptably sharp. That area is known as the Depth of Field.
I say "acceptably sharp" since there isn't a hard cut off from when the photograph goes from sharp to blurry. In fact, everything in front and behind that single point is out of focus to some degree. Depth of Field is the area where things look, to our eyes, like they are in focus.
If you were to zoom in on an image that looks completely sharp on a small screen, you will notice areas that are actually out of focus. Since Depth of Field is a subjective view to a degree, most Viewfinders / Live Views show you an image at your current lens' widest aperture (smallest f-stop) regardless of your actual settings. To get a preview of your actual Depth of Field most cameras come with a Depth of Field Preview button which gives you a more accurate image.
That's great and all, but how can I make the Depth of Field larger or smaller? Depth of Field is controlled by 3 factors: How far you are from the subject, the size of your aperture, and your focal length. Let's break this down one by one.
How far you are from the subject: Think about Depth of Field like a percentage whos value is changed be the 2 other factors below. 20% of an in focus flower is a lot smaller than 20% of an in focus mountain. So, if you want a shallower DOF, move in close to your subject.
The size of your aperture: The wider your aperture, the shallower your Depth of Field. Want only one subject in focus, go with a wider aperture (smaller f-stop). Want a landscape in focus, go with a narrower aperture (larger f-stop).
Your focal length: See the numbers on your lens 50mm, 70 - 200mm, etc? The larger that number, the shallower the DOF.
The combination of these three factors control your Depth of Field. Here is the way I usually handle it: First, I frame my shot which determines how far I am from the subject and my focal length. Second, I set my aperture based on what I'd like to have in focus; wide for focusing on one subject, narrow for landscapes. The best way to practice is to find a subject and take a picture at various settings/distances and see what happens.
Depth of Field sounds like a pain to master, but with it you can take some incredible shots that Isolate your subject or blur the foreground to show depth.