Try to boot into Recovery. Restart and immediately press ⌘-R. You will need an internet connection for this and may have to select your network connection. Then go into Disk Utility and reformat your drive. Afterwards, go into reinstalling OS X/macOS, whichever is offered to you.
It looks like you are able to boot from an attached drive to be able to bring up Disk Utility. It always helps if you can provide the make/model of your Mac, and the system version you are running. If you were running, or plan on running, macOS 10.13 or newer, you should choose to format the drive as APFS.