Depth of field is the term used to describe how much of the picture is in focus. Here's the long description:
http://en.wikipedia.org/wiki/Depth_of_field
the short answer is you want a wide apature, a long focul length, and the subject close to the camera for minimum depth of field. Compact cameras have a small distance between the back of the lens and the sensor meaning they have a larger depth of field for the same apature, makes it harder to get the effect you're after though.
Jambo