After having all things set up i.e. Installing VirtualBox, Installing OS on VirtualBox, you might have wondering how to share something between Ubuntu(Primary OS) and XP(on VM). For this we need to install Guest Additions image.
For this, after running XP in VM, go to Devices menu on the top and select ‘Insert Guest Additions CD image’ and it will ask you for downloading it.
Now click on Settings > Shared Folders > Machine Folders and select a folder(may create a new one like below).
Then tick on ‘Auto-mount’ and ‘Make Permanent’ if you want to mount it everytime you start the VirtualBox.