Open a terminal (applications -> utilities -> terminal) & type this command:
sudo fuser -c /Volumes/<volumename>
replacing <volumename> with the name of your drive (if you don't know it, first run this command:
df -h
to find it)
the fuser command will tell you what process ID is still accessing the drive
once you have that, you can run this command to find out what the process is:
ps axuw | grep <process_ID>
depending on what it is you might be able to try killing it with this command:
sudo kill <process_ID>
though I don't recommend doing that blindly until we know what the process is
shutting down/rebooting will probably also fix this but you don't want to have to do that every time
you may also want to verify the disk using disk utility (applications -> utilities -> disk utility)