The transaction does not end after each insert of update. The Governor Limits count for a so-called execution context. According to the Salesforce documentation this is:
An execution context is the context information available during the
lifetime of a transaction. Transactions are requests initiated by
users when they update a record in the UI, use the API to upload
records, etc.
Governor limits count for each execution contexts (e.g. are reset
between execution contexts).
As an example, consider a user that updates an account record, and a
trigger is fired which invokes a method in a helper class. This method
will have to operate within the governor limits for this transaction,
which means that it cannot perform more SOQL queries than the current
maximum, etc. Additionally, if the user performs the same operation
almost at the same time (for instance by saving two different records
in two different browser tabs), each transaction will be considered a
separate execution context and will have its own governor limits (e.g.
governor limits are not shared across transactions).
https://help.salesforce.com/apex/HTViewSolution?id=000187163&language=en_US
In other words: An execution context is all the resulting actions (methods calling each other, triggers etc.) of a request.