Why and how to change DNS settings on iPhone, iPad, Mac

Why and how to change DNS settings on iPhone, iPad, Mac