system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What is physically happening when a file gets deleted, and how is it physically stored anyway? How is the file still stored when the PC is off?
gpt
When a file gets deleted, it's still there it just has a flag applied to it to say that that space can now be used. 

Think of it like a car park. If a car (file) is in a space, it's there. Deleting a file just means a tarp is thrown over that car with the understanding that, if the space is needed, the car will be removed (it'll be overwritten). As soon as the tarp is there, the space might as well be empty. But it kinda isn't. That's why files can be recovered when they're deleted. You can get a special program that goes around and pulls off the tarps restoring the files. 

The way you delete files properly is by 'shredding' What happens then is the file is deleted, and random data is written over the same spot again, deleted, re-written, so there's nothing to recover. Even if the tarp is pulled off, there's nothing of any sense left there to retrieve. 

On a hard drive the data is stored magnetically. There's a physical disc inside, made of metal, and there's a head that magnetises areas of the discs in a pattern which when read, converts back to data. Magnetism persists without power, so that's how the data is held. 

With solid state storage (an SSD), the easiest way to think of it is there are a bunch of electrical switches inside, transistors, which can be either open or closed, and they're what's called 'non-volatile' that means whatever state they're in, they'll stay in whether there's power there or not. There are millions of these switches, and depending on the pattern they're switched into, that can represent data. 

I realize this is being very vague indeed, but it's a subject that would rapidly jump out of ELI5 territory if you went into the nuts and bolts of it.