When you type a sourcecode in lets say, c++, your computer cant do anyting with it: he only onderstands his own machinecode. A compiler 'translates' the sourcecode into machinecode, so your computer is able to run the program. Besides a compiler you'll also need a linker (two different programs) in most cases. This is because you use librarys, wich need to be included, otherwise the program is incomplete. (This is called static librarys, you can also use one library for all your programs)
You can also run a program indirectly using an interpeter (eg, this is the case when you use html), but thats a lot slower (to be honest, i dont know a program that can run c++ sourcecode, but i guess its possible).
Normally you wont use a compiler and a linker, but an IDE (Intergrated Development Environment), wich also has an editor and some help-tools in it. I would recommend DevC++ (
http://www.bloodshed.net/). (DevC++ is not a compiler: it uses MinGW for that)