How does Time Machine work?
To avoid a long and fastidious answer: 


Time Machine is duplicating (incremental backup) your root folder, i.e. /.
However, you have the ability to exclude folders from the backup (see: macOS Sierra: Exclude items from a Time Machine backup
The answer to question 2: caches and temporary files are not backed up. They are a part of the default exclusion list of Time Machine. You can see the full exclusion list here: /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist. 
The answer to question 1: Time Machine backups folders as Applications Support, Preferences. So, to be short: if you consider that removing an app == moving  in the Trash folder, then you will restore all the files spread on your system by the apps you "deleted" before your last backup. If you deleted them properly by removing the .app and all the linked files spread on your system, you will end up with a clean system.