Up to 40 levels of undo are supported. This means that you can undo up to 40 times and have each previous operation automatically reversed in the correct sequence.
Some operations are stored as two Undo steps. For example, suppose you have a section of text selected and then paste in something from the clipboard. After the paste, you change your mind and want to Undo the operation. In this case, the first Undo will clear the pasted text and the next Undo will re-insert the original text.
This menu item will be ghosted if no Undo operations are stored, or if you have undone all operations stored.