How can a fighter aircraft involved in a face-off detect a missile lock from a trailing aircraft so that it can make evasive maneuvers?
To add some data to Matthew's answer:
Anti aircraft missiles come in basically 4 types (some others have been tried but aren't in common use).
- Active radar homing
- Passive radar homing
- Infrared homing
- Laser guided
Active radar homing has a radar in the missile sending out signals. Those signals can be detected and classified by the target aircraft.
Passive radar homing has a receiver in the missile reacting to specific signals bounced off of the target by the launching system. These too can be detected and classified by the target aircraft.
Infrared missiles are completely passive and can't be detected this way.
Laser guided missiles are like passive radar homing missiles, except they react to reflections of a laser beam rather than a radar signal. These too can of course be detected and classified with appropriate sensors.
There have been some attempts at detecting missiles by their own infrared signature, typically their engine exhaust. But this is problematic because most of that is of course blocked from the missile's target by the missile body, and also many missiles will spend a lot of their flight towards the target in an unpowered glide state, thus not having a hot engine exhaust.
Other systems generally can't be detected by the target either. Think optical guidance using a radio link with the missile (while you might be able to detect the link, you can't readily know what it's doing or that you're the target if you do recognise it as a missile guidance link).
Optical guidance using control wires is not generally used with anti-aircraft missiles, but sometimes anti-tank missiles using these systems are used against slow flying aircraft. These are utterly impossible to detect.
A general search radar, because it has to search a much larger portion of the area around the plane, can only scan so many times a second.
When that radar finds a target, and the pilot commands the system to lock onto the target, it enables a different radar system, that searches a much smaller portion of the area around the plane where the target is known to be. This gives not only greater resolution on the target, but it can scan it much faster because it's only scanning a small portion of the area around the plane.
Targeted missiles also only scan a small portion ahead of them, and do so very quickly so they can react quickly to changes in target vector and position.
Most "missile lock indicators" simply listen to how frequently a radar scan takes place, and when it starts happening very quickly it indicates that the faster, more focused radar has found them and is considered locked on, or that a missile with a fast, focused radar has found them and is locked on.
The subject of a radar lock-on may become aware of the fact that it is being actively targeted by virtue of the electro-magnetic emissions of the tracking system, notably the illuminator. This condition will present a heightened threat to the target, as it indicates that a missile may be about to be fired at it.
Before we talk about lock-on, let's consider the WWII battle between the RAF's u-boat hunting radars and the Metox radar detector on the German submarines.
The RAF introduced their first sub-hunting radar in 1940. This initially consisted of two antennas that had a wide broadcast pattern, about 30 degrees on either side of the antenna centerline. They put one under each wing, pointed outward at 22.5 degrees. Note that this results in an overlap area in front of the nose where both antennas cover. A motorized switch sent the radar signal alternately to each antenna, I can't recall the exact speed, but for argument's sake, let's say 100 times a second.
When the aircraft was searching for targets, in most cases it would only be visible to one antenna or the other. At first the aircraft would fly past it until they saw the signal fading, meaning it was passing about 60 degrees off the nose. The navigator would then plot a likely position, and the aircraft would turn towards the plot.
At this point, the uboat would be visible to both antennas. By comparing the strength of the signal in the two, they could tell which way to turn until they were pointed right at it.
The Germans figured out what was going on when their uboat losses shot up in early 1942. They responded with the Metox detector, simply a radio receiver tuned to the RAF's radar frequency around 176 MHz.
Now imagine what this is like for the radio operator listening to Metox. When the aircraft was still searching they would hear only the signals from one of the two antennas, so it would warble in their earphones at the switching rate - in this case they would hear it buzzing at 50 Hz. When then aircraft turned towards them they would start to hear the signal from both antennas, so the tone would suddenly jump to 100 Hz. They knew the aircraft was now approaching them, and would dive.
By this point the British had figured out that they could compare the signals strengths from the two antennas electronically, much more accurately than a human could. This coincided with new radars in the microwave region that needed antennas only a few cm long. Now it became very easy to put two antennas right beside each other and let the electronics figure out which was closer to the target. The output was the "error signal", which was amplified and sent to motors pointing the antennas, and this caused the entire platform to automatically track the target. Once again, the target could tell it was being tracked by listening to the signal. If it was pulsing and then suddenly became steady, the radar was locked on.
Additionally, some radars changed the pattern of the entire broadcast. This is often used to put more signal on the target during a dogfight or while a missile is being fired. For long-range work radars tend to put out a smaller number of longer signals, while at shorter ranges more signals of shorter duration are better. The radar detector can listen for these changes to indicate lock on. This was the method used by the USAF's systems over Vietnam, they listened for a change in the pulse repetition frequency of the SA-2's radar.
Modern radars and missiles don't do this, and detecting lock-on is basically impossible now. Very modern AESA radars generate different frequencies and signals with every pulse, so a receiver doesn't get the same signal twice. This makes it almost impossible to know a radar is even painting you, let alone that its tracking you. Additionally, the missiles don't track continually, instead they receive an initial location from the aircraft's computer and then fly to that point in space, then turn on their own radar. The target generally doesn't know a thing until the missile goes active a few seconds from impact.
This is why the UV detection is so important, even though, as others have noted, it is not terribly effective.