That depends, how you delete it. Deleting the operating system that is currently running, should give you some trouble. So, you are likely going to delete only parts, which is likely going to result in all kinds of errors. Not necessarily right away, but afterwards, when you try some actions and especially when you reboot. Likely it’s not going to run anymore.
If you use another medium and wipe it in a clean way… well, the operating system is just other data and therefore stored on the hard drive. So, what happens is, you wipe the data on the hard drive and that’s it.
The device still works. But in order to make use of it, you need some operating system. So, you need to either use some sort of live system or install an operating system again.
==========================================
If the answer was helpful for you, please don’t forget to upvote it on Quora.