If you are installing from source tarball, ie the file you downloaded ended with .tar.gz, .tar.bz, .tgz or .tbz, then it will install everything in the right place. Mostly /usr or /usr/local. I'm pretty sure RPMs are similar.
The thing about linux programmes (or packages as they are sometimes called), is that one programme is not stored in just one directory, like in windows. Some programmes are spread out a bit. the binary (ie executables) are put in /usr/bin, the libraries (kinda like DLLs) in /usr/lib, etc.