Since you didn't say what you wanted to chroot, I will describe chrooting /bin/bash
First you must create a directory to change root to. This is often referred to as a chroot jail.
All commands need to be run as root to create the chroot jail.
mkdir /home/jail
cd /home/jail
You should probably pick a filesystem that won't cause system problems if it fills up, alternatively you can put quotas on the directory. It is possible for the process running in the jail will run away and fill up available space.
Now we should create an environment for the jail and the shell
mkdir bin etc lib
chmod 755 bin etc lib
chown root:root bin etc lib
Create a file called profile with your favorite editor and put the following in it. This file should be placed in the etc directory in the jail.
# profile
# Where can commands be found
PATH=/bin
# Set commands to safe settings
alias rm='rm -i'
alias mv='mv -i'
export PATH
Now you need to populate the jail's bin directory with some commands. These commands should be statically linked, otherwise you will have to also copy in the required libraries into your jail.
If you want/need to use dynamically linked binaries, you should use the ldd command to identify the libs you will need.
ex. ldd /bin/bash
libtermcap.so.2 => /lib/libtermcap.so.2 (0x4002b000)
libdl.so.2 => /lib/libdl.so.2 (0x40030000)
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
copy libtermcap.so.2 libdl.so.2 libc.so.6 and ld-linux.so.2 to the lib directory in your jail.
I decided to put ls rm mv and cp into the jail. I ran ldd on all these commands and found I didn't need any additional libs
so I copied the binaries into my bin directory
cp /bin/rm /bin/ls /bin/mv /bin/cp /bin/bash ./bin
I also created a world writable directory in the jail.
mkdir public
chmod 777 public
and finally, I ran chroot:
chroot /home/jail /bin/bash --login
As you try out the environment, you will find out it's not particularly useful since we didn't put a lot of commands in the jail. Another thing to note is that you are still root in the jail (albeit with almost no power)
Based upon the process you put in the jail, you will probably need to expand the environment to suite the process. Some things to think about are a var directory and commands that make the jail useful.
Hopefully this get's you started.
-Glenn