The first step is to download the Code::Blocks setup file from here.
After you download the setup file you selected, launch it to start the setup process. The setup program is a standard installer for Windows. Just press "Next" after reading each screen. You will be given the chance to read the program license, enter the installation directory and select which plugins you want installed. A help text on installing a compiler will also appear. Read it!
Alternative method for installing a nightly build
NOTE: if you have installed CodeBlocks RC1 (released fall of 2005), please either uninstall it or make sure you use a different directory. DO NOT install beta releases ontop of RC1.
The general overview:
-1: Download and install MinGW
-2: Download gdb 6.3.2 from MinGW website and install it. 
-3: Download and install 7-zip the Zip utility CodeBlocks comes in.
-4: Download CodeBlocks nightly build 
-5: Download the unicode windows wxWidget dll for Code::Blocks 
-6: Download wxWidgets and build it
-7: Unzip CodeBlocks and the wxWidget dll for Code::Blocks
-8: Start CodeBlocks and configure GNU GCC compiler
Installing CodeBlocks on Windows:
Get and install the required components Code::Blocks officially supports wxWidgets 2.6.
You'll need a complete, working MinGW installation. 
You'll also want the GDB debugger found here: 
Download and unpack CodeBlocks wherever you wish.  (You'll need the 7zip utility.)
Download wxWidgets 2.6.2 from  Unzip wxWidgets then:
After unpacking the zip file to a directory of your choice, open a cmd prompt, and navigate to the folder build/msw inside the wxWidgets folder. Use the following commands to compile wxWidgets*):
Run the following 3 commands:
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
*) This assumes your MinGW installation is in C:\mingw. Use a different path if you installed MinGW somewhere else.
This is a quick guide to get Code::Blocks up and running on your ubuntu based Linux distribution. It is also going to make sure you can develop wxWidgets applications on your box as well. Look at the bottom of this guide for a complete command line that will install all the packages in one operation.
1. Get the latest daily build of Code::Blocks from the forum.
2. Install Code::Blocks.
sudo dpkg -i <Name_Of_Daily_Build.deb>
3. Install the compiler.
sudo apt-get install build-essential
4. Install the debugger.
sudo apt-get install gdb
5. Install wxWidgets library. (This package is all that is needed to run any application that uses wxWidgets. ie. Code::Blocks)
sudo apt-get install libwxgtk2.6-0
6. Install the wxWidgets developement packages. (This is used to develop wxWidgets applications of your own.)
sudo apt-get install libwxgtk2.6-dev wx2.6-headers wx-common
7. (OPTIONAL) Install the wxWidgets documentation.
sudo apt-get install wx2.6-doc
NOTE: Here is a complete command line for steps 3 - 7. Watch for word wrap.
sudo apt-get install build-essential gdb libwxgtk2.6-0 libwxgtk2.6-dev wx2.6-headers wx2.6-doc wx-common
Without optional steps:
sudo apt-get install build-essential gdb libwxgtk2.6-0 libwxgtk2.6-dev wx2.6-headers wx-common