Time machine is the version history of a file. With it, you can see a full record of every change made to the file, revert to previous file versions, or branch off to create new versions from the existing ones.
To access a file's version history, click the Time machine button in the bottom right of a board. In a doc, the same button is labelled Version history:

Time machine will appear at the bottom of the screen. You can then hit Play to see the complete file history - when and who has made what changes.
Time machine will load the file from latest changes, to oldest.
At any point, you can show or hide the file's current state alongside the earlier state you're viewing:

Click the Play button to see how the file has changed and Pause when you're ready to restore it. You can use the <> arrows to move forward or backward one change at a time.

From there, you can choose to:

Time machine history is available for a different duration, depending on your plan: