Electronic Countermeasures consist of technology and techniques to defeat enemy sensor systems, both in combat and other situations. They can take the form of sensor jamming, stealth systems, and cloaking devices.
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 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
The most common ECM in Star Trek is the cloaking device. Sensor jamming and general stealth techniques are sometimes referenced.