In the top corner of the Story Map top toolbar, there are buttons that undo and redo actions you take. Undo reverses the last action you took; redo redoes actions you undid. Twine tracks all actions you take editing a story, so you can undo multiple actions in a row.
The undo and redo buttons in the top toolbar don't affect text changes you make in an individual passages. There are separate undo and redo buttons in each passage editing dialog that manage your editing history there.
When you leave the Story Map screen, either going to a different screen in Twine or closing the application entirely, your undo history is discarded.
If the undo or redo button is disabled, that's because there's nothing to undo or redo yet.