Press Ctrl+Z (or Command+Z on Mac) to undo your last action. Press Ctrl+Shift+Z (or Command+Shift+Z) to redo.
You can also click the Undo and Redo buttons at the top of the toolbar.
Undo and redo work for all drawing actions: filling cells, drawing edges, placing and editing tokens, fog of war changes, and background image operations.