Just a quick way to complie and build a package which you've either built yourself or downloaded from somewhere like Github or Gitlab.
Once you've cloned the git repository change to the directory it created and run the following command:
This will build the PKGBUILD files you've downloaded and the option –syncdeps will check for and install any required dependencies for the package that you may not already have installed.
When the command completes run the following command:
makepkg --install --clean
What this does is install the package you compiled in the previous step and then the option –clean will clean up leftover files and folders. It will prevent obsolete and remnant files from carrying over to any new builds.
More information can be learned over on the Arch Wiki.