Your program will have requirements according to what you are building.
If you use the MinGW compiler, the only base requirement on the target machine is the MSVCRT library, which is available on every computer running Windows. That doesn't mean you can't have other dependencies.
If you use the Cygwin compiler, you will have to distribute the Cygwin runtime library.
If you use the XYZ compiler, you may need ABC...
If you use any other library (Windows-specific or other ones, such as wxWidgets) then these will be required on the target computers. For example, if you build a DirectX10 application, then the target computers must have DirectX10 (not 9, not 8, not anything else).
You may even have to look up symbols dynamically to ensure your program works with different library versions. It absolutely depends what you want to do, and what you want to target.
Code::Blocks does not know anything about this and will not do anything about it. It is the developer's responsibility.
Under Linux, it is even more complicated since distributions are not standardized. If you cannot distribute the sources (along with a configure/build environment) then you will have to compile one package for every distribution. Most package managers under Linux allow you to define things like "must have X and Y installed" so these will be automatically installed with your program if you do it right (which is not always easy).
But again, Code::Blocks knows nothing about this, it's your task to figure out.