Electronic countermeasures consist of technologies and techniques used to defeat enemy sensor systems, both in combat and in other situations. They can take the form of sensor jamming, stealth systems, decoys, and cloaking devices.
Stealth is a type of countermeasure designed to keep a vehicle from showing up on enemy sensors. The principals of stealth are to minimize reflections from active sensor systems and to minimize emissions that might be detectable to passive sensor systems.
As an example, modern stealth aircraft are made of materials that absorb the electromagnetic waves emitted by RADAR systems, reducing the amount of energy they reflect. Furthermore, the fuselage of a stealth aircraft is carefully shaped to keep whatever energy does reflect from bouncing directly back toward its source. With its own RADAR system turned off, a stealth aircraft can have RADAR profile smaller than that of a bird.
Jamming is an effort to blind enemy sensors with an overload of signal. If successful, the effect of jamming on a sensor system is much like looking at a very bright light with your unprotected eyes: you know there's a light source, but you may not be able to identify it because of the glare, and you may not be able to see other objects near the light source. Similarly, loud music from a stereo would be easy to hear, but the loud noise could easily drown out the sound of several people sneaking around the area.
A source of electronic jamming doesn't conceal its own existence, but it can keep itself from being identified and potentially hide numerous other objects behind the glare of signal it produces.
Spoofing is an effort to fool enemy sensors into reporting false information. If successful, the sensor will report detecting something different from what is actually present. A spoofing system might send out signals or energy patterns consistent with something harmless or friendly, disguising an approaching threat. Spoofing might be accomplished by configuring a vehicle to reflect active sensor waves in the same pattern as a friendly vehicle or by mimicking the transponder transmissions of a friendly vehicle.
In Star Wars
All combat craft in Star Wars are equipped with some kind of ECM system, typically sensor jamming.
At the Battle of Yavin, the Death Star's jamming was so intense that the Rebel fighters could not detect enemy fighters on electronic sensors (including electronic optical sensors) until the Imperial fighters were right on top of them. The Rebel pilots had to rely on visual sighting to find enemy fighters.
In Star Trek
In Babylon 5
The most noteworthy ECM in Babylon 5 is the stealth technology employed by the Minbari Federation. This technology makes Minbari ships essentially invisible to enemy sensors if they choose to be. Even when running their own active sensors, Minbari ECM technology prevents the sensors of the other Young Races from obtaining weapon locks.