An IR spectrum covers thousands of wavenumbers, typically $\sim 4000$ to $\pu{400 cm-1}$.
How are the spectrometers able to generate different wavelengths of light covering this entire range of wavelengths?
Chemistry Stack Exchange is a question and answer site for scientists, academics, teachers, and students in the field of chemistry. It only takes a minute to sign up.
Sign up to join this communityThis could be accomplished by a scanning instrument. A broad-band light source could output IR radiation over the whole range. This incident radiation is passed through a monochromator to individually select wavelengths to send to the sample. This monochromator can work many ways, using mirrors, gratings, prisms, etc.
Alternatively, you could expose the sample to the broad-band radiation and use a detector that captures all of the transmitted radiation at once. UV/Visible spectroscopy can be done with a photodiode array detector capable of this, but I know of no IR spectrometers that use this method.
Most modern IR spectrometers use Fourier transform. An interferometer, converts an IR laser beam into broad-band IR pulses through interference generated with moving mirrors or by other methods. This action converts the coherent beam into an interference pattern in time. The interferogram below shows what this might look like (where this mirror position is also the time axis). The image has been released to the public domain by Wikipedia user Sbyrnes321.
Absorption of IR radiation by the sample perturbs the interference pattern before it hits the detector. Electronics or software perform the Fourier transform, converting time data into frequency data.
IR spectrometers detect the IR light via either by a monochrometer or an FT interferometer (as per Ben Norris's answer) They generate the light with a fairly simple heating element (normally an electrically heated ceramic block). Being hot, it produces broadband black body radiation.