first you need a programmer's editor. then get the compiler. If you are using mingw, make sure you get MSYS, because you will need it.
look for README files and INSTALL files, they will tell you how to install your compiler. same goes for whatever you are building.
adding the compiler to your PATH
make sure you add your compiler's bin directory to your PATH environment variable. typically this is done with [windows-logo-flag-key]-[Pause/Break], Advanced, Environment Variables, System, PATH.
make sure you hit the [End] key during first editing so that you do not overwrite your PATH but rather append. then type a semicolon (;) and paste/type in the path of the compiler's bin directory, and click OK.
wrapper batch file for compiler
I wrote a wrapper batch file for the mingw compiler so it generates windows vista/7 compatible code. It must be configured. by default it is configured for mingw-w64.
the batch file is at mingw.
mingw compiling code without batch file
g++ -W -Wall -o someprogram.exe someprogram.cpp c:\mingw\lib\libws2_32.a
gcc -W -Wall -o someprogram.exe someprogram.c c:\mingw\lib\libws2_32.a