For an object to oscillate there must be what's called a restoring force acting on it. A restoring force pushes or pulls the object back toward an equilibrium point (usually where it was before it was "provoked" into oscillating) at which the force acting on it goes away. But now the object is moving, and objects in motion keep moving when there's no force on them. So the object goes past the equilibrium point in the other direction, which in turn causes the restoring force again, this time pushing/pulling in the other direction back toward the equilibrium point. And so on...
In most cases, the natural frequency depends on the mass of the object (objects with greater mass usually oscillate at lower frequencies) and the strength of the restoring force (stiffer objects oscillate at higher frequencies).