How to focus on object and blur the background?
This is called "shallow depth of field", there are 3 factor (that you control) that affect depth of field:
Distance to subject - as you get closer less will be in focus, also, you will get more background blur if the background is far away
Focal length - longer focal length = less in focus
Aperture - this is the easiest to use because it's a setting you dial into your camera but it's the "weakest" factor of the 3, to get less in focus use a bigger aperture (smaller F number)
it's worth pointing out that if they are looking for a particular composition, the distance to subject and focal length are linked which makes aperture a much stronger factor relative to the ratio between the other two (depending on shot conditions at least). For example, on a full frame at f/4, 10 feet and 50mm the DoF is 2.94 feet. Alter it to be 100mm and 20 feet (same shot width) and the DoF is only 2.89 feet. .5 feet for a doubling change. Dropping to f/2.8 (50mm and 10ft) gives 2.06 feet or a change of .88 feet.
@AJHenderson - someone following your advice with his brand new APS-C DSLR and kit lens is going to try to shoot everything in 18mm f/3.5, the hyperfocal distance will be just below 16 feet and getting significant background blur will be nearly impossible (possibly unless the background is a mountain in the distance), at the telephoto end with 55mm at f/5.6 the hyperfocal distance is 92.5 feet and any typical shooting distance (for friends and family, not animals in a safari) will give you a DOF of less than 5 feet (people who own f/2.8 lenses probably don't need to ask this question)
The best balancing point is going to depend on how far out they can stay wide-open. Say for example they are able to make it to 28mm on f/3.6, at 10 feet (on a crop sensor), they would have a dof of 5.6 feet. Going to 55mm and f/5.6 with a similar composition (20 feet to subject), the dof is going to be 9 feet. Not quite double, so they may very well still be better up close with it more open.
Oh wait, maybe I see what you are saying now. You're looking at the fact that the hyper focal distance will be reached sooner. I suppose that would be true if the background is actually far enough away. In my example, the background would need to be at least 35 feet behind the subject or the shorter configuration would still give more blur if my understanding is correct.
@AJHenderson - you didn't read the question correctly, it wasn't "how to blur the background more for the same composition" it's "I got this new camera that should be able to blur the background and I can't do it", the asker has a D5100 - a DX camera and he probably has the 18-55mm f/3.5-5.6G VR kit lens that only reaches max aperture at 18-ish mm - now, you can't get nice blurred background at 18mm, this just isn't going to work in any common shooting scenario, however, at 55mm f/5.6 just about any headshot will show some background blur
the lens bit makes sense. I don't know Nikon's kit's well enough to know that lens. I think the same composition thing is relevant though. That's how a new shooter is going to think of things. They have some shot that they want to get, but they want the background to be blurry. Knowing how to best get the blur in the shot they are thinking of is going to be the most helpful. That said, for this lens, it sounds like long and closed is the best bet since it is a very slow lens.