On windows in $APPDATA$\CodeBlocks (ususally c:\Users\[username]\AppData\Roaming\CodeBlocks ), on linux in $HOME/.codeblocks.
The settings are saved in default.conf, if C::B is not called with the -p (--personality,--profile) parameter. In this case it is saved in [personality].conf .
Editting the conf-file manually is not recommended, because it can break the settings and even make C::B crash in some rare cases.
To import and export some parts of the conf-file, you can use cb_share_config[.exe].
If soemthing went totally wrong, you can delete the file and it will be recreated from scratch.