Resonance occurs when a driving frequency is similar to the natural frequency of the system. The system is forced to vibrate at its natural frequency and therefore absorbs maximum energy, which means that the amplitude of oscillations is at its peak, and the system is in resonance.