Will a factory reset of iPhone 4 restore original iOS?

I've got a friend who recently got an iPhone 4 from a sibling who got a new phone. She upgraded it to iOS 7 and it started crashing. It's a hardware issue and we have done everything we can to stop the crashing but the conclusion has been reached that iOS 7 can't work on her phone. Apple Support as helpful as they are told her to buy a new phone.

However,
When she got the phone, the phone store did a total reset of the iPhone and it was restored to iOS 3 or 4. It was one of the really old versions. How can we reset it in such a way? I'm guessing it was a factory reset. Can a factory reset revert the iOS to the very original one the phone came with?

I believe resetting it updates the firmware on the device, but this can be avoided by restoring a back up of the iOS version from iTunes, which is not of much use to you.