Welcome to LQ!
Installing a compiler is one of those odd things - basically, you need a compiler to compile the compiler. Therefore, the best way for most people is to use a precompiled package for your distribution.
You don't say what distribution you are using. If it is Ubuntu - try using
Code:
sudo aptitude install build-essential
This will give you the C compiler (gcc) along with other useful tools such as make, and give you most of the base development libraries.
I hope this helps,
--Ian
PS: Please put your distribution in your profile. It helps us to help you.