DNS settings and protection

How do you change your DNS settings in Linux/Windows?
I was trying to change my DNS settings but don’t really know how to? Can anyone help me with this?
And if i change my DNS settings, will it protect me on my online privacy?
Thanks