When the point of reflection and the point of origin of the the wave are separated by a distance which is a multiple of the wavelength of the sound then these cancellation and reinforcement points will always occur in the same place and a standing wave results.
A vibrating guitar string is an example of one such standing wave; when it is plucked the tension in the string - which causes the string to occupy the shortest length possible between the two tether points of bridge and nut - forces the string to straighten out, driving a pulse towards each end of the string. When these two pulses are reflected back as a result of the string's momentum and inertia they cause a standing wave to be created.
A standing wave in a guitar string will occur at a specific frequency defined by the tension of the string, it's linear density (gauge) and length. The lowest frequency at which this can develop, the system's "natural" frequency, is called the string's fundamental frequency because a standing wave can develop not at one frequency but many, all of which are exact multiples of the fundamental and these frequencies are called the harmonics.
In order to properly understand this it's necessary to take a short detour into the physics of vibration.
Ultimately, All sound is vibration of a fluid medium. In our case, as land dwelling mammals, the medium is usually air; although occasionally it can be water and rarely it is a mixture of other gases. There are a number of different other vibrating media that can be employed to generate these airborne vibrations but because this article is aimed at guitarists I'll make reference to the physics of vibrating strings as this also provides the most convenient way to visualise some of the more complex ideas.
The term resonance is an overused term and, like it's stablemate phase, is often used incorrectly and out of context.
In the context of acoustic science resonance refers to a process in which an object is provoked to vibrate continuously by means of a mechanical stimulus to the point where the vibration becomes self-sustaining for a period of time. All vibrating systems have a frequency at which vibrations sustain most easily and this is known as the system's natural frequency. In electronic systems this is also sometimes called the resonant peak.
The building block of resonance is the phenomenon called a standing wave. In an unrestricted medium repeating waves move freely outward from their source but when they encounter a reflective surface and waves are reflected back along their path of origin the waveforms can produce an interference effect where movement of the medium in one direction either cancels or reinforces the movement associated with the opposing wave.
