Changed something you did not mean to? Press Undo at the top of the builder to step back, and Redo to step forward again.
History lists every saved version of your site with when it was made and who made it. Press Restore on one to put it back; the version you have now is kept in History too, so nothing is lost by restoring.
Undo cannot go back past a template switch, but History keeps a copy of your site from just before you switched. Restoring that copy puts your old words back on the template you have now. It does not switch the template back.
How long versions are kept depends on your plan: 14 days on Launch, 90 days on Spark and Orbit and a year on Galaxy and up. Your 5 newest versions are always kept, whatever their age.