Store the magnet at room temperature. Storing it at a temperature greater than its Curie temperature will demagnetize it. The Curie temperature–named after the French scientist Pierre Curie–is the temperature at which magnets lose their permanent magnetism. This temperature varies, based on the magnetic material. Here are the Curie temperatures for the four most common types of permanent magnets: ceramic/ferrite magnets–460°C, alnico magnets (alloy of aluminum, nickel, and cobalt)–860°C, samarium cobalt magnets (alloy of samarium and cobalt)–750°C, and neodymium magnet (alloy of neodymium, iron, and boron)–310°C.
Take care to protect the magnet against mechanical shock. Samarium cobalt, neodymium, and ceramic/ferrite magnets are brittle. They will crack or break if they fall on a hard surface or bang against metal or another magnet. Do not strike them with a hammer. Alnico magnets are the strongest of the four types. They will not crack or break with any mechanical shock.
Keep the magnets in a dry place. The most likely to suffer moisture degradation is the neodymium magnet. The other three types of magnets are not prone to rust or corrosion.
Put away each type of magnet in its own space or drawer to prevent demagnetization. The common alnico magnet is the most easily demagnetized. Use a magnet keeper to preserve the magnetic charge. You can store horseshoe magnets end-to-end, with opposite poles touching. Store bar magnets so that the opposite poles are beside each other–the north pole of one magnet should be next to the south pole of the other. The other three types of magnets do not demagnetize easily.