Private DNS settings were only seen on the features list of Android P and Google didn’t really talk about it much.
“DNS” stands for Domain Name Server. It 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 plays a huge role on the way how the Internet works. However, Google never really naively supported any kind of DNS settings. If you wanted to change the server, you would have to do it on a per-network basis, while using a static IP address.
Recently, Google made a post about it on the Android Developers Blog, and they explained how it actually works. In the settings, you can change the DNS used across all apps and networks. This wan’t possible without using a third-party VPN service. 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.
Source: Android Police