Where is the actual data stored and how does that data get stored How does data get stored for bitcoin?

Does data in the blocks get stored in files or a database and then get referenced by the blockchain?

If data is being stored in file, how does the blockchain create the files, put the data into them, and in what format are the files?

If none of that is true and the blockchain data exists in memory, if all of the nodes went down, how do you bring the blockchain back up?
If you are running a full node you have the blockchain stored on your HDD/SSD. If it was stored in your memory you would lose the blockchain everytime you restart your computer.


  If data is being stored in file, how does the blockchain create the files, put the data into them, and in what format are the files?


The blockchain doesn't create the data/files, the blockchain is the data. In case of the Bitcoin Core wallet you can see the blockchain data as .DAT files in your AppData directory under:

C:\Users\fihdi\AppData\Roaming\Bitcoin\blocks


In case you use the standard directory.