Composer is PHP's dependency manager, and Laravel uses it to install and autoload every package the app needs. You list dependencies in composer.json, and Composer records the exact installed versions in composer.lock.
composer install reads the lock file, so every machine gets the same versions. composer update resolves newer versions and rewrites the lock file.
Composer also builds the PSR-4 autoloader, which loads a class such as App\Models\User from its file path without manual require calls. A new project usually starts with composer create-project laravel/laravel.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.