The infrared missiles are usually detected using a Missile Approach Warning Sensor (MAWS).
The Missile Approach Warning Systems are passive detectors, usually detecting either the infrared or ultraviolet rays emitted by the incoming missiles.
The infrared based systems detect the infrared waves emitted by the missile. The ultraviolet based systems detect the ultraviolet rays emitted by the missile's rocket motors and are more suitable for detecting missiles with solid rocket motors.
An example for the infrared based detector is the US-Israel PAWS, while the Swedish MAW-300 uses an ultraviolet detector. Some systems like the MWS-20 uses Doppler Radar to detect the missiles.
All these systems have their advantages and disadvantages, and in relation to your previous question, give a 360 degree coverage based on the location of their installation.
In most of the aircraft, these detection systems, along with the Radar Warning Receiver, which detect the Radar based missiles are integrated into the Self Protection System(SPS), which determines the threat level of the incoming missile and responds accordingly by firing chaff and flares.