What takes place during an iPhone hard reset? In response to an iPhone 7 freezing issue I'm having, it was suggested to try a hard reset (holding power + volume down for 10 seconds for iPhone 7 or holding power + home on older iPhones). 

This got me wondering what an hard reset actually does. After searching around online, I've sound some that say it is just a hard power-off (isn't this what holding just the power button does?) and others mentioning something about a library being rebuilt. Overall, many, at least from several years ago, cited it as a cure-all for various phone issues.

Does anyone know what a hard reset does? I'm envisioning something analogous booting a Mac in safe mode or doing a PRAM/SMC reset on a Mac, but online searches so far are leaving me unsure.
I do not know for sure that this happens but I was told that in order for IOS to do anything except just it's usual booting functions you actually need to do a hard reset three times in a row.

Not sure why, and this was advice I read (don't remember where) several years ago. Perhaps 3 hard resets in a row trigger some sort of flag that forces IOS to do some special maintenance, not really sure but I am throwing it out in case someone else has heard this or knows is it complete and utter BS.