KEH has published a helpful primer on memory cards that describes the different types, common error codes you might come across when using them, and how to take care of them:
Memory cards are quite sturdy and commonly expected to work through one million read/write/erase cycles. The weakest part of the card is the connectors however, and should withstand around 10,000 insertions/removals into a camera or card reader.
No matter which type of card (CF I&II, SD, XD, SM, MS, etc.) your camera takes, it’s a good idea to format it on a regular basis. While it may not happen often, these little cards of information can fail and reach the end of their life unexpectedly. To keep your card in good health, format it in the camera from time to time. (I format my card after every major download). This clears up the card and erases all of the data. Of course make sure that you have downloaded and saved onto a computer all of the files on the card before formatting.
Since the number of insert/remove cycles a card can handle is far less than the number of read/write cycles, it’s very important to handle your cards gently in order to prolong their lifespan.
P.S. Last month Canon also published a helpful guide on its cameras error codes and what they mean.