Before installing a compiler, look at the IDE (below) that you want to use. Some will already include a copy of a compiler.
The Cygwin project provides a Unix (technically Posix) emulation layer that allows many open source *nix packages to be compiled and run on Windows systems without modification. Install CygWin, then use its setup program to add g++ and gdb. This will give you a compiler plus library set that will be almost indistinguishable from waht we run on our CS Linux servers.
MingW is a "spin-off" of the CygWin compiler port that allows you to obtain g++ and gdb without the overhead of running the Unix emulation layer of CYgWin. (Code compiled by MingW can be used on other Windows PCs that don't have CygWin.) You may encounter occasional differences in the libraries supported by MingW and the ones used on our Linux network.
As a general observation, both of these ports are high-quality and should work well for you.
Some IDE's come with a compiler suite included. All can be used with compilers that you have downloaded separately, though not every IDE can work with every compiler. Downloading the compiler separately may make it a bit trickier to get started with the IDE (you may need to tell it where you have put the downloaded compiler) but may make it easier to update the compiler when new releases are available.
Windows users can download the binary release that includes the MinGW port of g++. If you have already downloaded and installed MingW or CygWin g++, then download a Code::Blocks distribution without the pre-packaged compiler.
Linux users should install g++ first, then download and install Code::Blocks.
As of summer 2013, I don't recommend Code::Blocks for OS/X (Mac) machines, as the debugger support seems to be broken.
Eclipse comes in many varieties. C++ programmers will want to start with the "Eclipse IDE for C/C++ Developers). (All of these varieties differ from one another only i nthe set of plugins and extensions installed at startup. You can add all the features on another "variety" at a later date.)
Eclipse does not come with a C++ compiler. You will want to install a compiler first, then install Eclipse. With luck, Eclipse will find the comiler the first time you run it. If not, you will need to tell it where you have put your compiler.
A lot of people in this Dept have grown fond of Dev-C++ package from Bloodshed Software. But I don't recommend it because it has gone so long since it's been updated (Feb 2005). The compiler version packaged with it is now badly out of date.