Often people will remove SD cards and other external storage without ejecting them. Windows uses a lazy writing model for data transfer. What that means is even if Windows states a file operation is complete it may in fact not be done. This will cause file corrupt when the media is removed.
Coming back to the issue at hand, first check if it has a physical switch on it. Some cards have a physical write protection switch. If not, then the SD card isn't working the best option is to reformat it.
If it still has problems after a format then the card itself is likely bad and you'll need to buy a replacement.