By default, Ubuntu doesn't come with compilers, you should install them yourself (sudo apt-get install build-essential). Sometimes additional packages will be needed.
After you install build-essential you can compile the source code. I didn't do it recently so I don't really remember how it's done, but I'm pretty sure the command for compiling is make. It creates a binary file that you can run. Anyway, whenever I needed to compile something on Ubuntu the website where I found the source code also had a very detailed description of how to compile it.
What exactly do you want to compile?