You have not provided enough details.
What is the exact model of the Mac and version of macOS being used? You can get this information by clicking the Apple menu and selecting "About This Mac".
Is this an internal or external drive? And what file system (if any) is currently on the drive? Are you using any third party software to manage the drive? Using the drive manufacturer's third party software is usually a recipe for future problems.
Usually the "Couldn't unmount disk" means macOS is still accessing files on that drive. Try rebooting the Mac to see if you can then erase the drive. When erasing the drive you will want to select the whole physical drive within Disk Utility and use the GUID partition type. The file system you choose will depend on how you will use the drive. Within Disk Utility you may need to click "View" and select "Show All Devices" before the physical drive appears on the left pane of Disk Utility.
If you still cannot erase the drive because it cannot be unmounted, then you need to figure out which app or process is still accessing the drive. This can be a bit tricky and even difficult sometimes.