Ya gotta love a magnet ... one of the few things on earth that can be returned to its original state .... just a few seconds with an electromagnet ... bingo
Hardened steel magnets (Rickys) can be brought back to full saturation with a conventional "coil electromagnet" and a DC power source.
Non-rare earth magnets ... Alnico (Aluminum-Nickel-Cobalt) magnets and Ceramic (Strontium and Barium Ferrite) magnets require substantally more "juice" to saturate ... therefore medium energy capacitor discharge electromagnets are needed.
Rare earth magnets like Sm-Co (Samarium-Cobalt) magnets and Nd-Fe-B (Neodymium-Iron-Boron) magnets require tremendous amounts of energy i.e. high voltage capacitor discharge units ... but as Carl pointed out ... once saturated, degaussin' ain't a problem.
If you took a magnet and isolated it, it would never "lose" it's magnetism. That's kind of hard to do when they're used in any sort of application, though. There are 4 factors that cause a magnet to lose it's strength.
Heat-
Magnets don't like high heat. Fortunately, it takes several hundred degrees to begin to degrade a magnet, so this usually isn't a problem.
Mechanical shock-
Dropping, or banging on magnets, will cause some of their strength to be lost. In addition, those made of brittle materials are liable to break, or chip. So, don't "bang them around" too much.
Exposure to high current AC fields-
Magnets can be discharged by AC fields, and this is how a demagnetizer, or degausser, works. About the only threat for us is putting a soldering gun near the magnet. Transformer-type soldering guns put out big AC fields because their transformers <u>aren't</u> shielded, so keep them at least 6" away from any pickup magnets when you're using them for soldering. Better yet, use a pencil-type soldering device...these have a resistance element which produces the heat, instead of the "shorted transformer" of a soldering gun.
Transferance (or "bleed-off")-
Any time a ferrous (iron or steel) object is brought near a magnet, a tiny amount of the magnetism is transfered to the object. This amount of bleed-off is increased if that object actually "touches" the magnet. Stroking the same object across the magnet will cause even larger amounts of transferance. Over a period of many years, significant amounts of magnetism are lost to the many strings you use.
But with reasonable care, pickup magnets will last several decades, and that's usually good enough for us. Magnets can be replaced, or can be "recharged"...either commercially, or with home-made apparatus. If you want to try this yourself, there are ample sources on the Web, so I won't go into the "how-to's" here.
Why do some pickups have longer magnets (as evidenced from the under side)on the lower frequency strings? I have two pickups with progressively longer magnets toward the bass strings side.