This term could refer to the overall effect throughout the universe of magnetism reacting with electricity, but in a localized sense it could refer to an area of exceptional electromagnetism or a magnetic field created artificially using coils, through which an electric current was passed, to create magnetism. The direction of this field depended on the direction of the current sent through the coil. The strength and radius of the field was limited to a local area around the object. The higher the current which passed through the coil, the stronger the field and its effects would be with respect to the distance of the object.
Federation starships, including USS Enterprise-D, USS Voyager, and runabouts used magnetic interlocks to constrain the antimatter flow. (Star Trek Generations; VOY: "Emanations"; DS9: "Our Man Bashir")
The Borg used an electromagnetic field to prevent transporter access to their cube after the battle of Wolf 359. This tactic was circumvented by piloting a shuttle through the field and transporting from inside the field. (TNG: "The Best of Both Worlds, Part II")
In 2369, Lieutenant Jadzia Dax created an electromagnetic pulse which was sent via Deep Space 9's tractor beam to the Federation freighter Norkova. This pulse was reflected by the freighters shields and created an electromagnetic field which freed Doctor Julian Bashir from the consciousness of the Kobliad criminal Rao Vantika. (DS9: "The Passenger")