how does Time Machine restore?
As time goes by, you make various edits to a given file, and Time Machine will make progressive backups of that file. Backups continue so long as there is available storage space upon the hard drive. When hard drive space runs out, older file backups are discarded.

To perform a restore, one can perform a full system restore, which returns the entirety of your Mac file system contents to the latest files and structure that had been backed up.

Alternatively, you can browse through the progressive backups using a Finder-like interface, and choose specific files or folders to restore.

For more in-depth descriptions, it is worthwhile to read Pondini's repository of Time Machine information.