Dropbox is like a time machine. It keeps snapshots of every change in your Dropbox folder over the last 30 days (or longer with the Packrat feature). So even if you saved a bad change, or if the file has been damaged or deleted, you can restore the file to an older version with only a few clicks.
To find the file's version history online, click on the file from the file browser and select Previous versions from the blue action bar at the top. If you've deleted the file by accident, you'll want to recover the deleted file first.
Once you click on Previous Versions, you'll be sent to an online list of the various snapshots Dropbox has taken during the history of the file. When you see the file you want to restore, select the radio button to the left of the file and press the Restore button.
You can find a list of previous revisions by right-clicking the file from your desktop. Hover your mouse over the Dropbox submenu and select View Previous Versions....
Clicking on View Previous Versions... will take you to the Dropbox website to view old revisions. From there, you can follow the website instructions above to recover an old version or even undelete a file removed by accident.
If recovering files becomes a recurring issue, you can upgrade your account to include the Packrat feature. Doing so gives you unlimited snapshots of your files, allowing you to go recover any file as far back in time as you like. Find out more about Packrat.