I do not understand SQL Server Transaction Logs
Whenever I make a change to a table, does it get written to both the
  database file AND the transaction log file?


It is written to both, but it is written differently to each. The changes are made to the data pages in memory and are eventually flushed to disk via the checkpoint process. the changes are sent to a log buffer and hardened to disk at some point, though before the data file is written to disk to keep with the write ahead logging protocol.


  Furthermore: When I do a backup of the transaction log file, does it
  clear ALL logs? Or does it just remove some?


A log backups allows VLFs of the log to me marked for reuse if nothing is actively depending upon them. Nothing is physically cleared, just marked to allowed to be reused.