My flash disk encountered an error saying that it has been write protected, so of course I can't even copy files or even format my flash drive.
What happened to my flash drive to cause this?
And is there a way I can I fix this?
USB flash disks are easily got corrupted in time and this seems to be the case for you. The first thing you should do is to recover your files on the flash disk. There are several programs to do that. Then you can discard the disk and buy a new one. Never trust USB disks and always remember to back up your data.
Check that your flash drive doesn't have a switch on it somewhere that turns on write protected mode.
If you can't find a switch (and you bought this / e.g. not a promotional stick that is designed for write once) then it may be corrupt or otherwise damaged.