TCAS / ACAS
Airborne collision avoidance. It interrogates nearby transponders and, if a collision is likely, issues a coordinated climb or descend instruction to both crews.
A traffic advisory alerts; a resolution advisory instructs. The instruction is coordinated between the two aircraft so they are never told to go the same way, and crews are required to follow it immediately, including in preference to a conflicting air traffic control instruction.
That last rule was written in blood: the Überlingen mid-air in 2002 involved one crew following the RA and the other following the controller.
Related terms
Two aircraft collide in flight. Investigations centre on separation: who was responsible for it, what each crew could see, and what the collision-avoidance systems did.
Terrain awareness and warning systems. They compare the aircraft's position against a terrain database and call "terrain, pull up" before impact.