You may haven’t known that but all materials in the world reveal some magnetic properties, so one can classify any media by the behavior in the external magnetic field.
Here you can see a typical scheme of the field created by a permanent rod-shaped magnet. Black lines (called magnetic force lines) show the direction of the field in space. The density of lines represents the strength of the field. The denser the lines – the stronger the field. By agreement the direction of the magnetic field outside magnet is chosen to be from the north pole to the south pole. To be honest poles are just a way of saying that a field has a certain direction, in fact there are no poles of course.
Back to magnetic properties of materials. It occurs that there are only two ways the media behaves in the external magnetic field. It can be pulled into or pushed out of the external magnetic field. In other words, any material being placed in external magnetic field, “prefers” to move in the direction where the density of force lines is higher or lower.
Materials called paramagnets are pulled into the magnetic field. If you spill a liquid oxygen near a C-magnet, you can observe as it flows between the poles. The opposite situation will be observed if one takes the liquid Nitrogen which is a diamagnetic.
So the second kind which tends to “jump” outside the magnetic field is called diamagnetics. Water is a typical diamagnetic. Thanks to diamagnetism of water which is abundant in all living beings, the Nobel and Ig Nobel prize winner Andre Geim has taught a frog to fly: when it was placed in strong magnetic field frog started to levitate.
You may ask why then don’t we see such a behavior of all things around us in everyday life?
Well, diamagnets and most paramagnets are very “weak” and one cannot directly observe their magnetic properties. Frogs don’t fly because a really strong field is required for it. In order to make a human levitate like Geim’s frog one needs field much stronger than can be obtained on Earth by modern technologies.
Nevertheless there are three peculiar metals in the periodic table – iron, nickel and cobalt – which can demonstrate strong magnetic properties. They are called ferromagnets (by the Latin term for iron, Ferrum). Ferromagnets are widely used in many devices around, such as compasses, magnets, memory devices, loudspeakers, magnetic field sensors, electric motors, transformers, induction coils etc.
So what’s “wrong” with these metals? Of course, any properties of the matter are due to its inner structure. Properly, each atom is a miniature magnet (more or less powerful) thanks to electrons which “rotate” around nuclei. In the majority of materials the configuration of electrons results in a quite weak magnetic field produced by a single atom, moreover atoms’ magnetic field is oriented arbitrary and thus myriads of atoms give almost nothing integrally.
Atoms of ferromagnets, generating strong magnetic field, interact with each other and hold themselves in certain order – they are banded into large spatial groups called magnetic domains (see demonstration here). The direction of the elementary magnetic moments inside each domain is the same and thus total magnetization of domain is really huge.
Schematic picture of magnetic domains. Arrows represent the direction of atoms’ magnetic field.
By the way information on HDDs is recorded by management of domains magnetization: for example, one can say that separate domain in the HDD slab stands for “1” if its magnetic moment is oriented to the left or “0” if in the opposite direction. Ideologically the same principles were applied in old floppy disks as well.
Basically, each ferromagnet can be considered as a large number of small magnets – magnetic domains. But it is still not a magnet because all these “domains-magnets” are oriented chaotically. Nevertheless, if one places a ferromagnetic rod into strong magnetic field produced by electro-magnet all magnetic domains will arrange along the direction of external field. In such a way the rod will transform into permanent magnet we all used to.
So, as you can see, it’s an orientation of magnetic domains inside the material which makes it a magnet instead of regular piece of metal. And thus a reason why magnets should not be stressed by a hammer or something arises naturally: part of domain magnetic moments will change the direction or some domains will be divided into smaller ones with arbitrary directions of magnetization. It reduces the total magnetic moment and if you hit a magnet several times real hard it can lose almost all its strength.
Still hitting magnets?
http://www.magnet.fsu.edu/education/tutorials/java/domains/ – interesting simulation showing how magnet influences the domain structure of a rod.