When anything is hit it will vibrate at the same frequency regardless of the force that hits it. This frequency of un-damped oscillations is the natural frequency. And every object/system has its own set of natural frequencies. If an object is subject to a driving force (external periodic force), it will vibrate at the frequency of this driving force and not the natural frequency. Resonance is where the amplitude of the forced vibration reaches a maximum. If the driving force frequency corresponds with the natural frequency of a system this will cause resonance. This happens at this point due to this is where maximum energy transfer from the driving system into the oscillating system occurs. Resonance is usually avoided due to the increase in amplitude of vibrations can get to dangerous levels. But it does have uses for example- in musical instruments such as the guitar.
Further from A-Level-
Damping is where energy is being removed from a system. And this is what causes free vibrations (vibrations caused by initial conditions) to get gradually smaller and eventually stop. This can be caused by anything from air resistance to friction within a bearing.
If there is damping within the system. Then the maximum amplitude for the forced vibration will occur slightly lower than the natural frequency.