How to use composer properly. Composer is a package management tool for PHP. Helping you declare and manage your projects library dependencies.
Unlike Operating systems such as Linux and MacOsx, composer is NOT a package manager such as systems like YUM, APTITUDE, APT or HomeBrew. But more of a project by project basis dependency manager, since everything is installed within the ./vendor directory and not a global scale.
Composer however does have a global dependency section though, this is more to assist with the project dependencies.
So if you have a project whether that be a framework or a custom PHP application. Whilst either of these can have requirements you can tell composer to require these libraries within. Whilst have it manage there dependencies as well as the projects dependencies.