Like Brian mentioned, if you have MacKeeper installed, get rid of it. But you may also have just hit a web page that is showing that popup ad for MacKeeper. While in Safari hit command-q to quit Safari then hold the shift key the next time you launch Safari and it will stop that page from reloading.