Magnets are closely associated with electrical energy because they create a magnetic field that can induce an electrical current in a conductor. This phenomenon is known as electromagnetic induction and is the basis for many electrical devices such as generators, transformers, and motors. The magnetic field created by a magnet can also interact with the magnetic fields of other magnets or magnetic materials, resulting in attractive or repulsive forces that can be used for various applications.