Mistakes. We all make them. The "Undo Action" allows you to take back an action, such as deleting an email or marking it as Spam. The Undo notification bar will appear at the top of your screen in bright yellow for a short period of time after you complete an action to allow you to undo that action.
Note: Once that notification disappears, you no longer can take back the action.