A great food photography should make you so hungry that you want to eat the photo in front of you. Depth of field is the distance from the closest point to your eye that appears in focus to the farthest point away from your eye that still seems to be in focus.
Photographers tends to use a shallow depth of field to draw the eye to a specific part of the photo (usually the main piece of food or part of it). Occasionally however, you might wish to close the aperture of your camera to capture a deeper depth of field. Both can work, depends on your style or what the client wants.
At the begging of food photography, images were shot with infinite focus. In the last 15-20 years, food photographers choose to have softer images with only one small piece of the subject sharp.
DOF (depth of field) is a combination between aperture size, lens focal length and the distance between the subject from the lens. You can see in the image some examples.
Tilt shift lenses also can control you DOF, altering the angle of the plane of focus.
A great food photography is a combination of the composition, perfect lighting, and a great style. So, keep shooting!