If your drive continues to be in use, following what Ubrales mentioned about formatting through the Disk Management console, you can remove the drive letter from the disk through the same console, which will close whatever is trying to access the disk so you can format it.