By default you cannot drag / drop a file in to a VirtualBox VM.

This is how you do it using shared folders.

Make sure you have “Guest additions” installed in the VM.

Start the virtual machine (VM)
Go to Devices > Shared Folders > Add shared folders
Make a folder on your local PC under the Machine folders section. Make sure you tick the make permanent box.
Connect to the virtual machine

If it’s a Windows VM:
Start > Run > cmd

In the command prompt type:
net use X: \\vboxsvr\nameofyourfolder

Wait for the “command completed successfully” message and you should have a network drive “X:” under My Computer.

In a Linux OS you need to install the Guest Additions. After doing so type this into Bash:
mount -t vboxfs ShareName MountPoint