How do iPhones and Macs handle OS storage? This topic came up yesterday from a friend of mine who owns both a Macbook and an iPhone 6. His iPhone is almost out of storage space; about 500MB remaining, and he claims this is due to all the iOS operating systems he has installed over his time with the phone. He also says that this is the same with Apple computers. When he installed up to Mavericks, he lost a lot of storage space because the new operating system "installed separately from the previous one", taking up more space. 

It just doesn't make any sense, and I feel like he is wrong, but I'm not sure how to explain it, nor can I find any data to back up his claim or the opposite.

So, the question(s) is, how is storage of the operating systems accomplished for Macbooks and iPhones? Are previous versions of operating systems indeed stored on the phone, even after updating to the newest one? Would this contribute to his lack of available space on the iPhone? Finally, how could this be resolved without taking it to an Apple store?
When IOS is updated the old operating system is replaced. the same is true for MacOS. So Tetsujin's comment is correct, if less than helpful ;-). But understand the caveats.

IOS sometimes does not delete old temporary files and the file system fills up with junk that is difficult to delete. If you back-up the phone in question to your computer, erase all content and settings and then restore from the backup just created those temp files will be gone. So trying this might give you some of your "missing" space back.

For MacOS when a new version is installed (EG Yosemite to El Capitan) the installer is usually left on the computer in the /Applications folder. I will usually make a restore USB key with that installer and then delete it as they are often fairly large (5GB or so).

With the Mac temp/cache files may also build up with time and utilities like the (free) Onyx will clean up those files and often free up some space.