Infrared countermeasures are means for defending aircraft against "heat-seeking" missiles that use the difference between their target's thermal radiation and that of the background. The countermeasures include evasive flying techniques, "jamming" techniques (e.g., flares) to make the target hard to find against the background, and systems that directly attack the infrared seeker.
While tactical fighters were the first candidates for such systems, followed by bombers, the advent of man-portable air defense systems (MANPADS) surface-to-air missiles made infrared countermeasures important for much slower aircraft more exposed to the ground, such as helicopters (especially special operations helicopters such as the MH-53 PAVE LOW), gunships such as the AC-130, and airliners threatened by terrorists. Presidential and other VIP transports were reputed to be some of the first aircraft, after fighters, to get infrared countermeasures.
The threat detection problem
There are two detection problems: one is detecting the thermal signature of a missile launch, or possible detecting a motion by exhaust heat or heat of the airframe versus the cooler background. The other problem is recognizing when a fired missile is using an infrared guidance system and if its functions can be attacked.
Launch and flight detection
Current systems, such as the AN/AAR-57(V) Common Missile Warning System detects the signature of potential surface-to-air and air-to-air missile threats the aircraft carrying it.  There is also a need for low-flying aircraft and helicopters to detect the firing of unguided weapons, such as rocket-propelled grenades.
Current launch detection systems are actually ultraviolet, not infrared, sensors. Using ultraviolet gets around some of the challenges of true infrared sensors, especially the mid- and far-wavelength infrared spectra, such as the need for cooling the sensor.  It generally is easier to deceive a basic heat detector, not even deliberately but sometimes due to the reality that there will be fire on a battlefield. Again, it is the threat detector, not the entire system. According to an early Army evaluation report, the goal was to "... provide passive missile detection, threat declaration, positive warning of a post-launch missile that is homing on the host platform, countermeasures effectiveness assessment, false alarm suppression, and cues to other on-board systems."
Attacking guidance systems
The basic countermeasure is a flare, but infrared sensors that operate on multiple wavelengths often can discriminate between flares and aircraft. In any case, flares essentially are limited to deceptive decoy(i.e., confusing the threat as to which target is real) or sacrificial decoy (i.e., convincing the threat that the decoy is the real target) functions.
More advanced countermeasures, against missiles believed to be using infrared homing, are specifically intended to dazzle or damage infrared missile seeker heads, using an arc lamp at first, and later a laser. One of the challenges here, however, is not just detecting a rocket launch, appropriate whether the missile is using infrared, ultraviolet, or radar guidance, but determining the specific missile and presumed guidance type. Inappropriately activating a radar jammer against an actual infrared threat may activate enemy radar warning receiver, and actively help the enemy's targeting.
If focused infrared energy can be directed straight into the thermal seeker, an infrared jammer may overload it as dows a flare, or, given a sufficiently tight beam of the correct wavelength, it may even damage the sensor. On the MH-53 PAVE LOW and AC-130, such directed energy comes from the AN/ALQ-157 system. Even civilian airliners are being equipped with lasers to damage the seeker of man-portable air defense systems, or shoulder-fired missiles considered to be a significant threat from terrorists. 
The first heat-seeking air-to-air missiles had restricted "engagement geometry" -- the relative angles between the firing aircraft and the target. While more recent missiles are "all-aspect", not needing a clear view of the hottest part of the aircraft, the engine, a defending pilot may still improve his chances by presenting the smallest possible infrared target to the missile. See air-to-air missiles for how the geometries have evolved.
Low infrared observability
"Stealth" aircraft do not only try to be low-observability with respect to radar, but to other potential sensors including infrared. They may use techniques such as mixing the exhaust with cooler air before it exits, shrouding the engine exhaust nozzle so it is as small a point as possible, and perhaps releasing some of the exhaust gas along edges of the aircraft.
Employing the countermeasure energy
The most basic countermeasure to a heat-seeking missile is to launch as many flares as possible into the air between the missile and target, hoping that the missile will lock onto a flare that is hotter than the aircraft engine or skin, or at least the missile cannot find the aircraft in what seems a wall of fire. Over time, the flares evolved to more sophisticated heat sources that could confuse multispectral sensors.
A newer development involves directed energy, aimed precisely into the missile seeker, to confuse it or to overload and destroy it.
Originally, the flare launchers were no more than magazine-fed chutes on the tail, and perhaps near engines or other hot parts of the aircraft.
More advanced countermeasures, however, such as the AN/ALE-47 Countermeasures Dispenser System (CMDS), is a "smart" dispenser that can integrate with defensive avionics such as radar warning receivers, radar reflector (i.e., chaff) dispensers, radar jammers, as well as helping the pilot with situational awareness of the threat. 
With very intelligent infrared seekers, broadband may not be the ideal solution. If the seeker, for example, looked for the emission spectral lines of burning magnesium, it might reject a flare and continue searching. It might also look for a temperature more typical of an engine than a flare. As with most sensors, there is a never-ending battle of measure-countermeasure-countercountermeasure.
Directed infrared countermeasures begin by requiring precise threat location. Once such information, the countermeasure system aims a beam of visible or invisible light, to which the missile seeker is sensitive, directly into it. Such beams are most commonly generated by lasers, but can use other intense sources such as arc lamps.
This places far more energy into the seeker than is possible with a flare. As a result, the seeker may overload and lose track, or actually be destroyed.
- Director, Operational Test and Evaluation, U.S. Department of Defense, Suite of Integrated Infrared Countermeasures (SIIRCM)/Common Missile Warning System (CMWS, AN/AAR-57), Annual Report FY 2003
- Richard J. Nelson, Integrated Hostile Fire Indication Sensor, Solid State Scientific Corporation
- BaE Systems North America, AN/AAR-57(V) Common Missile Warning System
- BaE Systems, AN/ALQ-157(M) infrared countermeasures system
- BaE Systems, JETEYE™ Commercial Airliner Infrared Missile Protection System
- NAVAIR Electronic Warfare Software Support Activity (EWSSA), System Support: ALE-47