This selection restores the image to the state prior to any operation that modifies the image data. This menu item will show what will be undone beside the "Undo" menu text. If there is nothing to undo, the menu selection will be disabled.
The number of undo/redo steps allowed is only limited only by the amount of available memory. You can set a specific memory limit by setting the Maximum memory for image undo buffers option in Options | Viewing - Editing. The image Undo/Redo feature can be disabled under the Options | Viewing - Editing dialog, by checking the Disable undo option.