I have downloaded the file from http://sourceforge.net/projects/boost/files/boost/1.40.0/boost_1_40_0.tar.gz/download
However, I don't know how to install it after downloading the file.
Follow these instructions in order to properly setup Boost C++: Link to "Getting started" manual.
Be aware that the version you downloaded is not the latest one. Boost C++ reached version 1.50 already.