What are the differences between
composer update
composer global update
It's not anything to do with Yii directly.
Composer allows you to install dependencies globally or per-project (the default).
https://getcomposer.org/doc/03-cli.md#global
This is merely a helper to manage a project stored in a central location that can hold CLI tools or Composer plugins that you want to have available everywhere.
You might want to install something like phpunit or phpcs globally (so it's available for every project) whereas installing a library or framework that you need for your project should be a per-project installation.