1. Open the terminal by

Navigate to Applications -> Utilities -> Terminal

2. Type command below and hit enter

Mac OSX 10.7 & 10.8 (Lions) : sudo killall -HUP mDNSResponder

Mac OSX 10.5 & 10.6 (Leopards) : dscacheutil -flushcache

Mac OSX 10.4 (Tiger) : lookupd -flushcache