To make an executable out of a C++ source file, you need a C++ compiler. On a Linux system, for example, the GNU C++ Compiler Toolset is installed by default already. MinGW is short for "Minimalist GNU for Windows", so it's that compiler toolset ported for Windows. So if you want to create executable programs with C++, it's helpful to have a compiler installed ;-)
How to install it the easiest way: Go to codeblocks.org / Downloads / Binary Release / Windows and choose the latest version, for example "codeblocks-16.01mingw-setup.exe. Take such a version with *mingw-setup.exe because the MinGW compiler system is already included there.
Whether you use Orwell DevC++ or Code::Blocks on windows, you are likely to get the same compiler bundled with the installer. The great advantage of that is that the installation should automatically configure the IDE to use the included compiler - usually quite foolproof.
However, if you are more confident about configuring things for yourself, you can download (for 64-bit Windows) a newer compiler: https://nuwen.net/mingw.html
This should work with either IDE (I've been using it with Orwell DevC++) but you have to do some of the configuration yourself, so the IDE knows where to find the new compiler.