You've probably seen an electromagnet in action. This is a coil of current-carrying wire that acts like a magnet. But why does this happen? And how are electricity and magnetism related? To understand this concept, you must start by understanding that there are two types of electric charge: positive and negative. Positive charges repel other positive charges, and negative charges repel other negative charges. Positive and negative charges attract each other, however.
Most applications of electricity involve pushing negative charges around electric circuits. As these negative charges move around the circuit, they cause lights to glow, elements to heat up, motors to turn, and many other things. The important concept to understand is that magnets apply forces to moving electric charges, and moving charges apply forces to magnets. This includes the negative charges that are moving inside a wire. If you place a current-carrying wire near a strong magnet, that wire will experience a force from the magnet! In addition, the magnet will experience a force from the wire.
Engineers have developed many different ways to apply this relationship between electricity and magnetism. The electromagnet is one such application. The relationship between electricity and magnetism is also key to the function of speakers, microphones, and electric motors. The most important application, however, is probably for electrical power generation. By moving a non-current-carrying wire near a magnet, you can produce a current in that wire. This occurs because the magnet pushes the negative charges through the moving wire. Almost all electrical power plants today make use of this principle. This means that without the relationship between electricity and magnetism, you would literally be in the dark.