If I were to backup my Mac with Time Machine does it do a file level backup or a block level backup? I don't want want some deleted files on my Mac to be stored on my backup HDD and even for restores. For example if I put back the data on the HDD to my Mac does it do a file level or block level restore?
It does file-level versioned backup. It is intended as a set-and-forget type of universal backup, so as long as your backup drive is at least as big as your OS drive, all you need to do is keep it available and backups will be taken care of. When you need to restore a single file, you can use Time Machine to enter the restore browser, but if you need to recover a complete system, you can either do that from the macOS installer or the recovery mode.