DOF is effected by the lens opening (aperture), focal length of the lens, subject to camera distance and subject to background distance.
A large lens opening (small f-number like f/2.8) gives a shallow DOF and a small lens opening (large f-number like f/16) give very deep DOF with virtually everything in focus.
You can play with different lens focal lengths and settings at www.dofmaster.com 's online DOF calculator.