In direct current (or DC) circuits, electricity flows in one direction. In alternating current (or AC) circuits, the electricity switches directions, sometimes going forward and sometimes going backward.
A magnet near the wire in a DC circuit attracts the electrons on its positive side and repels the electrons on its negative side. This causes the electricity to flow in one direction only; DC power from a battery works this way. However, it is not an efficient way to transfer electricity over long distances because it begins to lose energy.
AC circuits use rotating magnets instead of applying magnetism along the wire. When the magnet is facing one direction the electricity flows in that direction. When the magnet is flipped, the flow of electricity changes direction as well. Direct current can be stored in batteries, but alternating current cannot be stored. The voltage oscillates in AC circuits but is constant in a DC circuit.
Alternating current voltage can be increased or decreased using a device called a transformer. Transformers reduce the high voltage of AC to a lower voltage that is used in home appliances. Thomas Edison's work led to the DC battery system. Nikola Tesla came up with the AC generator by using a rotating magnet.