This is worth knowing before you need it, because it changes how bravely you edit. There is no version of "I have ruined it" that cannot be undone. Every publish is a saved point, listed by date, and restoring one is a couple of clicks.
It is also the answer to a question people ask nervously: what if somebody I let help makes a mess. History shows what changed and when, and any version can come back.
Step by step
In your dashboard, open History.
Find the version from before things went wrong. They are listed by date.
Restore it.
Check the page, then publish.
If it does not go to plan
I want to undo something I have not published yet.
Simpler than you think: you have not changed the live site at all. Start the page again from the page menu and the published version is untouched.
How far back does it go?
Every publish since your site was created.