Upon disexcitation (also called "fluorescence"), the active material in the laser cavity emits light that is no strictly monochromatic. Light emitted by the material is said to have a finite linewidth.
Will light being emitted by the laser have the same linewidth as the laser medium without a cavity ? The answer to this question is a bit involved.
1) The wings of the fluorescence line of the medium may not provide enough gain for a sustained laser emission. The natural global linewidth of the laser will therefore be somewhat narrower than that of the laser medium.
2) In a laser cavity, not all wavelengths are allowed to oscillate, even if gain is available at the considered wavelength.. It can be shown that for a wavelength to be allowed in a laser cavity, the cavity length has to be a multiple of half the wavelength. In general, there are several, or even many such wavelengths within the global linewidth of the laser. The spectrum of the laser looks therefore like a comb of frequencies, each frequency being very narrow. Each frequency is emitted by one mode of the cavity.
It is common to artificially alter the natural linewidth of a laser.
1) One often wants to have as chromatically pure a beam as possible. All the "teeth" of the comb, but one, have to be suppressed. This is achieved by adding some very narrow filtering device inside the cavity. The device creates important losses at all wavelengths of the comb, except one. This way, all modes but one can be suppressed.
2) To the contrary, one may want to broaden the laser linewidth. This is the case when one tries to force the laser to emit very short pulses : Fourier analysis shows that very short pulses always have very broad spectra. Sophisticated schemes (based on non linear phase modulation) can broaden the spectrum of a laser pulse much beyond the beam natural linewidth.