Step 1: After starting the ubuntu in VirtualBox Select Device->Install Guest Additions… from VirtualBox menu.
Step 2: Now in ubuntu open terminal and type the following bash command to install the VirtualBox guest addition
cd /media/cdrom sudo bash ./VBoxLinuxAdditions-x86.run
Then it will ask for the password, type your password and just after that you will have VirtualBox guest addition installed in your ubuntu. If you have older version of Ubuntu then it might require to upgrade your Linux kernel.
Here VBoxLinuxAdditions-x86.run is the file name of my VirtualBox guest addition.