Do you know what's wrong if the flashdrive, when inserted, says that it needs formatting? And none of the files will open.
If you format a drive (any drive), you will erase all your data. Sounds like your flash drive is ruined. This is what can happen if you remove a drive from a USB port too soon. Do some troubleshooting by inserting the flash drive into another computer. If you get the same message, chances are that you will have to say goodbye to whatever is saved on it!
Before you remove your next flash drive from your computer, click the "Safely Remove Hardware" icon at the bottom right of your monitor. Then click on the name of the drive--it will appear above the icon. If the computer says the drive is still in use, wait a while and go through the process again. This will usually (not always) free up the drive to be removed safely.