Have you ever wondered why you have been told to keep your hard drives or VHS tapes away from strong magnets, lest you lose your precious stored data and memories? The culprit is the physics behind the material that these storage devices are made of, that is magnetism and its effect on so called ferromagnetic material.
We’ve all experimented with magnets, maybe you’ve picked up a chain of paper clips with one while bored, or you collect fridge magnets from the places you visit. You might have seen these paperclips remain magnetic and stick to each other after contact with a magnet or wondered how your souvenir’s stick while other metallic objects don’t to your fridge door. These phenomena are due to this magnetic ‘memory’ associated with these objects.

An impressive collection of fridge magnets [1]
How do they work then?
To establish the basics, a magnet produces a magnetic field that conventionally goes from its north pole to the south pole. This can be seen when putting iron filings around a bar magnet.

Bar magnet with iron filings demonstrating the magnetic field of the magnet [2]
Any object that sticks to a magnet is consists of a material that is considered ferromagnetic. Some ferromagnetic materials include iron, nickel, cobalt, gadolinium, and their alloys (a metal made from two or more metallic elements).

Iron nails. Watch out if you’ve got a strong magnet. [3]
It is when an external magnetic field is applied to a ferromagnetic material, such as a magnet getting close to an iron nail, that all these domains present in the material align in the same direction parallel to the magnetic field applied. This ferromagnetic object is now magnetized. This is the basic explanation for why these ferromagnetic materials are attracted to magnets.
To open a ferromagnetic steel can of worms, the domains in the ferromagnetic material are very strong. Once they are aligned together, they end up reinforcing each other and stay aligned even after the magnetic field is removed. Apply a strong enough magnetic field, and the ferromagnetic material will stay magnetized indefinitely. Doing this allows you to obtain a fridge magnet. Depending on the magnetic field, the direction of the domains will be different. To demagnetize the material, a magnetic field in the opposite direction of the one previously applied must be used. This phenomenon is known as magnetic hysteresis. All hysteresis means is the behaviour of something depends on its history.

Visualization of the domains in a ferromagnetic material. When there’s no magnetic field applied, the domains aren’t aligned. When a magnetic field is applied, the domains align parallel to the field when the magnet is strong enough. When removing the field, the domains stay aligned. [4]

Some cassette tapes in case you forgot what these look like [5]
Image sources
Featured image: https://www.flickr.com/photos/schill/6891085910
[1] https://commons.wikimedia.org/wiki/File:Fridge_magnets_board.jpg
[2] https://commons.wikimedia.org/wiki/File:Ironfilings_cylindermagnet.svg
[3] https://pxhere.com/en/photo/1293541
[4] https://msestudent.com/what-is-magnetic-hysteresis-and-why-is-it-important/#g
[5] https://pxhere.com/en/photo/649005