In Linux, there are multiple ways to do this depending on the caching daemon you’re running (nscd, dnsmasq, etc..). I will defer to this askubuntu question for the best explanation of all scenarios but will outline the most common below:
sudo /etc/init.d/dns-clean restart
OR
sudo service dns-clean restart
Mac OS X
dscacheutil -flushcache
Windows (pretty much all of them):
ipconfig /flushdns