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 bottom of your screen for a short period of time after you complete an action to allow you to undo that action.
Once that notification disappears, you no longer can take back the action.