I have created my Time Machine backup in El Capitan (and updated the backup few hours later). Then I decided to enroll in Sierra Beta. At the moment I'm writing this, TM is backing up my content to my ubuntu server via AFP (in Sierra PB1).
Does Time Machine modify the backup by OS version on it's own or does it remove the old OS backup?
Basically, an upgrade just makes a lot of the files that are included in a backup write a newer copy. There isn't any major change to the storage format and hasn't been since Time Machine was implemented.
All the changes have been in the code that runs the backup or changes to the rules about what files are excluded, but those changes revert when you install a clean OS before you go to restore files from any of the intervals stored in the backup.
Time Machine backups are not bootable and they don't include all files - so you might not even end up restoring the files that change when you go from one OS update to the next.
Specifically - here are files that get excluded by rule:
On OS X, what files are excluded by rule from a Time Machine backup?
Time machine just backs up all files that aren't on a list to be skipped. It goes forward, time interval by time interval - writing any new files and updating any changed files. Assuming you aren't running low on space in the backup destination - you won't have any older files deleted from the backup and could restore files from before you made the upgrade.