Every sound speaker, from the smallest to the most powerful, has a permanent magnet. Located behind the centre of the speaker cone, the magnet interacts with a changing magnetic field from an electrical coil. The pushing and pulling forces move the speaker cone rapidly in and out, producing sound. Speaker manufacturers use different kinds of magnets to suit speakers of different sizes and to achieve a range of tone qualities.
To get good sound from a speaker, you need a strong magnet. Neodymium has the greatest field strength of any permanent magnet known. Speakers made with these magnets have good frequency response, and because the magnets are strong, you can use smaller magnets, reducing speaker size and weight.
Neodymium magnets made high-fidelity ear buds possible, as they can pack a strong magnetic field into a tiny package. However, these magnets shatter easily.
Magnets made of ferrite, also known as ceramic magnets, cost less and crack more easily than metal magnets. But they maintain their magnetic strength well over time, provided you don't bring a stronger neodymium magnet close. Their greater weight makes speaker systems heavier--a drawback for portable speakers and guitar amplifiers. Speakers with ferrite magnets tend to sound better when played louder.
The original permanent speaker magnets were made of alnico, an alloy of aluminium, nickel, iron and cobalt. Alnico is tougher and less prone to cracking than other magnet materials, though they can lose their magnetism more readily. More expensive than ferrite or neodymium, alnico gives speakers a warm, classic tone.
Because samarium cobalt costs more, speaker manufacturers use this material less often. It has most of the strength of neodymium while having better heat resistance. Samarium cobalt tends to be as brittle as neodymium, but it stands up better to moisture and corrosion.