The phenomenon

When a system has natural frequencies, a resonant behavior can be induced on it by applying a time varying external force with frequency close to the natural one of the system. Many examples of resonant systems can be found in Nature. Some of them are:
In the case of the Magnetic Resonance, the natural frequencies of the system are induced by the action of an external static magnetic field; the resonance frequency in these cases are proportional to the intensity of the applied static magnetic field. To induce resonance, an additional RF electromagnetic field has to be applied.

In some cases (as in the microwave cavity resonators or vibrating strings) the system has many characteristic frequencies and can show resonance at many frequencies.

As a general fact, the external "force" supplies energy to the system producing an increase in the amplitude of the "oscillations". This energy input to the system is more efficiently produced when the external force acts in a synchronous way, and this is achieved when the external frequency is close to the natural free frequency of the system. Otherwise the system sometimes gains energy and sometimes gives it back to the external source.

The system is said to be at resonance when both frequencies, the characteristic or natural of the system and the external one, are coincident. If the system has no possibility of releasing energy to the environment, that is to say, is a loss free system, the oscillations would increase without limit and the system eventually would break. But in general there are mechanisms for releasing energy to the exterior (like friction in the mechanical systems, or resistors in the electrical circuits). In this case, when the system is at resonance, the largest amplitude can be observed, but in the stationary state, this amplitude is stabilized when the energy input from the external source is equal to the energy lost to the environment.