The magnet's position relative to the rest of the speaker - highlighted in red.
Usually made of neodymium, the permanent magnet is attracted to or repelled by the electromagnet, moving the diaphragm and producing sound. The stronger the magnet, the better the speaker, and using a stronger magnet instead of a larger one is a more lightweight solution, better suited for use in headphones and portable speakers. Although neodymium works well for high-fidelity speakers, it can shatter easily.
Permanent magnets can be made from other materials as well:
‣ Samarium cobalt: a more durable but expensive material.
‣ Ferrite: a cheaper material which can crack easily and is a lot heavier, but its ⠀ magnetism can be retained for a longer period of time.
‣ Alnico: What the original permanent magnets were made from; it will not crack as easily, but its magnetism does not last as long as the other three materials. This material provides a warm old-feeling tone, but is also more expensive.