If the DNS, which your computer uses to resolve domain names into IP addresses, is compromised, your PC can be redirected to a malicious IP address, and your PC can be compromised that way.
Instead of resolving to the real
www.google.com IP address, your browser can be directed to the
www.evilhackersite.com IP address, and the web server there can exploit vulnerabilities in your browser. It may pretend to be Google in order to watch you click on something and steal a password, it may plant malware on you machine, then redirect you to the real Google, or it may exploit some other browser/user weakness altogether.
If you have a machine (one to which others may connect, like a server) which registers with DNS, if the machine is compromised, the malware could register a bad IP address with DNS, causing problems for others, or your machine's DNS queries could be intercepted and redirected before they ever leave your machine.
Also, if your machine is compromised, it could be part of an attack directed at the DNS server to overload it, so that it has no time to validate that its cache entries are correct with more authoritative sources.