Firstly install virtualbox from the repositories by opening the terminal and entering;
$ sudo apt-get install virtualbox
Ok all that went fine for me but then when i created a new virtual machine and tried to run it i got an error
VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).
so after a little searching i found the answer which was that you need to install modules for your kernel version, so back to the terminal again and enter;
$ uname -r
to find your kernel version, mines was;
2.6.24-24-generic
so in the terminal i just entered;
$ sudo apt-get install virtualbox-ose-modules-2.6.24-24-generic
(You need to change the kernal numbers at the end to match your output from your uname -r command)
Then restart virtualbox backend with the commands;
$ sudo /etc/init.d/vboxdrv restart && sudo /etc/init.d/virtualbox-ose restart
Then at the top of your desktop go to
System >> Administration >> Users and Groups
click unlock then manage groups and scroll all the way down near the bottom where youll see a group called vboxusers click properties and make sure your username has a tick beside it and click OK.
Now you just need to reboot the pc and virtualbox should be running perfect for you to install any other OS's inside your ubuntu.