List of newbie things that might be wrong.
1. You do NOT have a compiler installed
2. Code::Blocks is NOT configured right to use the compiler.
3. Code::Blocks is NOT configured right to use the terminal when running program.
4. The Code::Blocks project is NOT configured right.
5. Your code has a bug in it. (Not a valid topic for this site) per rules
http://forums.codeblocks.org/index.php/topic,9996.0.html6. Under the Windows OS, it is common for the Anti-Virus software to stop the program from running.
Items 1 and 2 should be able to be ruled in or out by seeing the build log.
Item 3; you need to check what terminal options Code::Blocks is set to use.
Menu Option: "Settings" -> "Enviroment..."
Section: "General Settings"
Report the value in box "Terminal to launch console programs".
NOTE: I have no idea of the correct value; but, sometimes it needs changed or the terminal program needs installed.