True, it's about distance from the subject, etc. but in practical terms, this is driven by sensor size. So, sensor size is the easier explanation for newbies.DOF is larger as
1) you stop down le lens: move from f2 to f22
2) you reduce the real mm lenght of you lense
3) ther greater the focus distance.
Sensor size does not matter in DOF.
The fact that a compact camera has to get 5mm lens to get to 25mm equivalent (35mm) brings about the exceptional DOF that all the compact cameras have.