go to a terminal and type man rpm
rpm -Uvh <package name> <----- installs or upgrades the rpm
rpm -e <package name> <----- uninstalls the rpm
rpm -qa | grep <a word in the package> <------ shows which version a package is
#rpm -qa | grep sendmail
to list the files in a package
#rpm -ql <packagename>
Another useful one is when you are trying to install a package to fix a dependency problem for another package you are trying to install but you are facing dependency problems with this one as well then you can use --nodeps
#rpm -Uvh --nodeps <package name>
same as uninstalling if you want to keep the dependencies.
#rpm -e --nodeps <package name>
As for where rpm installs all the files, they are all over the place. Thats why rpm is useful because it gives you one place to manage packages
I 'think' ??? rpm keeps a database somewhere to tell you whats going on but i cant remember where.