To expand on some of the earlier answers here is a set of rules that a digital photographer should know about depth of field and bokeh
!–When you focus on a subject everything at that distance will be as sharp as your camera lens and the number of pixels in your camera sensor can make it-nothing is perfect.
2-Any thing in front or behind the subject will be more or less out of focus. The sharpness of the image is determined by the circle of confusion (COC). This is a semi arbitrary number set by how sharp a typical human eye is–another optic system. The one thing to remember is that if you make a large print and look at it from 10 feet away you can get away with much more blur than if you look at the same print from a foot away.
3–If the distance to your subject is much farther than the focal length of your lens the depth of field extends twice as far behind the subject as it does in front of the subject. When the subject is very close–in macro photography for instance–the DOF is much smaller and extends the same distance is ether direction.
4–Wide angle lens have a greater DOF than telephoto lens.
5– Small apertures–big f numbers-- have a greater depth of field than large apertures–small f numbers. As you lower your f number–and cut down on the light– your image will become sharper until diffraction becomes a problem. With most digital cameras an f number of about 5 produces the sharpest image.
6–Small sensors like those in a typical digital camera have a greater DOF than a 35 mm film camera. This is good if you are doing landscape photography and want the depth of field; it’s not so good if you are doing portrait photograph and want to blur the background. But if you own a high end image editor like Photoshop you can blur the background using their lens blur procedures to produce the same effect. You can always blur excess detail. Going the other way around is more difficult
7–The hyperfocal distance is the focal distance where everything from infinity to somewhere close to the camera is in reasonable focus. How close somewhere close is depends on the focal length of the lens and the aperture. Setting the focus a little closer than the hyperfocal distances will blur very distant objects but sharpens objects in front of the camera
8–If you are serious about photography, studing up on DOF and hyperfocal distance is worth it. For example shutter lag in an auto-focus auto-exposure camera is set by the time it takes the camera to focus and then calculate the exposure. So if you use your manual mode to set both the exposure and the appropriate focal distance shutter lag becomes almost nonexistent.
9--Goggling terms like hyperfocal distance will bring up tutorials and charts. If charts and tutorials turn you off, do what I did when I wanted to snap photos of my young granddaughter dashing around the family room. I laid out her collection of stuffed animals along the floor, took images at different focal lengths and apertures and picked out the combination that looked the sharpest. Auto everything cameras have their down sides.
10–Some cameras and lens are supposed to have be better bokeh and produce a nicer looking blur than others. Personally, I’ve never seen that much difference, but of you are picky and worry about such things, the differences are caused by everything from the exact form of the lens aberrations to the number of leafs in the camera iris.