a package manager is an app that takes precompiled ready to go binaries and puts them where they belong on your system, usually links the libraries if needed and some of them even check for dependencies or even actually compile the app from source code as well...........
in other words, most of the time you have two ways to go:
get the app ready to install and use the package manager to install it
or
download the source code and compile it from scratch
both work, however, with precompiled binaries you dont have the option to select options done at compile time nor do you know exactly what someone else selected when they compiled it
but for large apps a precompiled binary is much faster to install
in order to compile something written in C you need a C compiler, gcc is prettymuch the standard C compiler these days, you also need the C library fies, headers, and kernel headers too in some cases----many many distros these days do not include this because they assume you will always be using prepackaged precompiled binaries----------always check the documentation to check for what dependencies an app needs and if you already have those on your system