Make sure that the following development packages for the boost library are installed (package names may vary; the version should be 1.48 or greater, and version 1.54 on Ubuntu 13.10 is reported not to work):
libboost-system-dev
libboost-filesystem-dev
libboost-program-options-dev
libboost-chrono-dev
libboost-test-dev
libboost-thread-dev
You'll also need the standard build tools such as automake, autoconf and libtool, but these are probably already on your system if you've done any compiling from source.
Clone the bitcoin repository from Github, configure, and build:
$ git clone https://github.com/bitcoin/bitcoin.git
$ cd bitcoin
$ ./autogen.sh
$ ./configure --without-gui
$ make -j4
If 'configure' complains about a missing libdb version 4.8, you have two options: either install the libdb4.8-dev package or use the add the '--with-incompatible-bdb' option to the 'configure' command line. Be warned that the latter option will result in your 'wallet.dat' files being incompatible with the binary build of bitcoind.
Your freshly compiled daemon is now in the src/ directory. Refer to Run: on the binary installation page for running instructions.