This is another note to self, it is very simple and I've done this a few times before but every single time I need to go back to the documentation.
In this example I'll install heimdall which is used for flashing new firmware onto samsung phones.
First go to https://aur.archlinux.org/ and type the name of the package into the package search box.
This takes us to https://aur.archlinux.org/packages/heimdall-git then copy the git clone url from the top. In my case I've got a folder setup for AUR installs because I like things to be organised but it's not necessary.
clone the repository, cd
into it, then run makepkg -si
. makepkg should not be run as root, when root permissions are needed you will be prompted for your password if you have sudo or the root password otherwise.
git clone https://aur.archlinux.org/heimdall-git.git
cd heimdall-git
makepkg -si
and that's it. It really is very simple.
Then later to remove the package and it's dependancies you can run
sudo pacman -Rs heimdall-git
You can also run pacman -Qem
to get a list of manually installed packages which for most people will be just the packages they have installed from AUR.