A cabinet is the common term for an enclosure in which a loudspeaker is mounted. The major role of the enclosure is to prevent the negative phase sound waves from the rear of the speaker from combining with the positive phase sound waves at the front of the speaker. The result of this would be cancellation and interference patterns, causing the efficiency and sound of the speaker to be compromised.
The ideal mount for a loudspeaker is a flat board (baffle) of infinite size with infinite space behind it. Thus the rear sound waves cannot cancel the front sound waves. Given a shortage of infinite size boards, cabinets (enclosures) must use other techniques to maximize the proper output of the loudspeaker. This is called loading.
To place the loudspeaker in a large sealed box, filled mostly with foam or wadding, is commonly referred to as an infinite baffle, as it approximates the ideal mount. Following on from this is a smaller sealed box, or, an acoustic suspension enclosure. With the correct loudspeaker, this will improve the efficiency and frequency response of the speaker.
Other types of cabinets attempt to improve the low frequency response or overall efficiency of the loudspeaker by using various combinations of reflex ports, transmission lines (material or structure that forms a path from one place to another for directing the transmission of acoustic waves), and horns.
For guitar cabinets, which in the early days were little more than a speaker in a wooden box with some insulation, it was the sympathetic vibrations and resonances of the cabinet that helped to give the characteristic sound that many players still rely upon even in more modern equipment.