Almost everyone has a digital camera these days, and that means the majority of us have some sort of memory card we rely upon to safely store our memories until we upload them to our machines or the cloud. But like any storage device, a memory card can benefit from a few tips/techniques specific to the format...
The KEH Camera Blog has an excellent post, Memory Cards- Compatibility, Error Codes, and Health, which breaks down understanding camera memory card codes specific to camera manufacturers, and also the three memory card formats (CF, SD, and SDXC).
The most common source of malfunction with memory cards is related to the connections:
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, not every download, just every major one where the card has been filled or almost filled). 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. Some older cards and cameras may also show error messages if the card is not properly formatted to that camera.
KEH also advises keeping those memory cards in their plastic cases when not inserted into the camera and not loose (oops), common sense, considering the habit will prevent debris or damage happening with those somewhat delicate connectors.
More details over at The KEH Camera Blog.