Magnetism comes from the constant movement of charged electrons in atoms.
As electrons swirl around an atom, they create an electrical current, and whenever electricity moves in a current, a magnetic field is created. So magnetism is a force between electric currents: two currents flowing in the same direction attract, while those pulling in opposite directions repel.

The reason some materials are magnetic, while others are not, has to do with how the electrons are ordered. In most materials, the electrons send their magnetic field in different directions, effectively canceling each other out. In magnetic materials, like most metals, the electrons can be aligned in one direction and pull together in that direction.
A magnet is an object made of magnetic materials; naturally occurring magnets are known as lodestones. Every magnet has at least one north pole and one south pole. In fact, if you take a bar magnet and break it into two pieces, each of the smaller pieces will still have a north and south pole. The Earth itself is a giant magnet with a north and south pole, which is why a magnetic compass's needle always points north/south.
Magnetism and electricity are flip sides of the same coin, and today are considered a single force, called electromagnetism. So magnets can be used to convert electrical energy into mechanical energy, or vice versa. That's why they can be found in so many common everyday objects: generators, motors, stereo speakers, telephone receivers, televisions, CD and DVD players, electric toothbrushes, computers, can openers, home appliances, even the magnetic strips on our credit cards.


