Magnetic seals were part of the matter/antimatter containment system aboard Federation starships in the 24th century. The seals prevented the antimatter from making contacting with the ship's structure and destroying the vessel.
In 2365, the USS Yamato was destroyed when its magnetic seals failed. The emergency system that would have ejected the antimatter from the ship in the event of a seal failure also did not function. (TNG: "Contagion")