Domain Name System, or 'DNS' for short, can best be described as a phone book for the internet. When you type in a domain, like google.com, the DNS looks up the IP address so content can be loaded. It's a critical part of modern networking, but Android has never had an option for a global DNS setting. If you wanted to change the server, you would have to do it on a per-network basis, while using a static IP address.
When Google announced Android P, one of the listed additions was a 'Private DNS' screen in the settings, but the company didn't clarify how it worked (beyond this developer documentation), and the setting didn't seem to work at all in our testing. Google has now made a post on the Android Developers Blog, explaining how it works and why it's important.
As we suspected, this allows you to change the DNS used across all apps and networks, which previously wasn't possible (without a third-party app using a VPN service, that is). Furthermore, Android P will support DNS over TLS, which encrypts all DNS queries so they can't be read or modified by anyone. Not all DNS providers support that technology, but several popular ones do, like Google and CloudFlare.
It's worth noting that some apps perform their own DNS queries, and must be updated to support the feature. Hopefully it will start working in the next Android P Developer Preview, so we can try it out.
- Android Developers