Write an article based on this summary:

Click the magnifying glass icon. Type disk utility. Click Disk Utility Utilities. Click the drive you want to format. Click Erase. Type a new name for the hard drive. Select the format and scheme. Click Erase.
It's at the top-right corner of the screen. A list of results will appear. This cannot be the drive on which macOS is installed. It's at the top of the window. The options you select will vary depending on your needs. The selected hard drive will now be erased and reformatted.