You've been able to install app updates automatically for some time now, but there was no way to install new system updates on your iPhone automatically. To get a new iOS version on your device, you'd go into the settings, then download the update. It would then either install right away or give you the option to install at nighttime. This whole process is easier in iOS 12.
Not mentioned at all in Apple's keynote at WWDC 2018, iOS 12 now sports an option to automatically install new iOS updates instead of always giving them the greenlight manually. For those of you who wait before updating to see if any major issues come out with other users, this likely won't be a setting you'll want to use. But if you don't mind jumping head first into a new update, this makes it easy.
To test it out, make sure you're running the iOS 12 beta since that's the only way to access this feature. Then, open the Settings app, tap "General," then "Software Update." If you have any updates ready to be installed, they'll be shown here, just like before. But you'll also notice a new "Automatic Updates" option. Tap on that, then toggle the switch on (it's disabled by default).
While there's not a whole lot of information about this setting, it will likely require that your iPhone is connected to Wi-Fi and a power source to proceed with an automatic iOS update, but that's not confirmed yet. Also, it will likely install it at nighttime, similar to what happens when you ask to install an iOS update later that you manually downloaded. And you'll probably have to enter your passcode when you pick up your iPhone afterward since it's needed after a restart anyway.
But with it on, you're all set to receive updates as soon as they come in, which should be good for this beta period at least. I've experienced some iPhone-stalling bugs, so getting those patches sooner rather than later will be a big help. Just note that your iPhone will be unusable for a few minutes while it installs the new iOS version, which means services like 911 will not be usable during that time.