Typically the file system structure is corrupted on the removable media which causes attempts to write data to fail. Since it can't complete the write operation, it can't finish the ejection process.
Format the media. This action will permanently erase any existing data on the media, so only do this if you are sure there is no existing data that you want to keep.
Check out what others say about this issue and review or add your own comments and solutions!