It is fairly rare to have problems with a metrocard, but it does happen. A year or so ago I was having a problem where I kept buying metrocards and they kept stopping working. I finally figured out that a magentic card I was carrying for access to my building was the culprit; once I started carrying that card separately, I never had a problem again.
Unforunately, when you do have a problem such as this, the only recourse is to buy a new metrocard and mail the "broken" card to the MTA for a replacement or refund; the station clerks usually are unable to help, other than to give you the form/envelope to mail in. I had a problem with several cards, and although it may have taken several weeks, I eventually was mailed replacements (with the value restored) for each of them.