Keep you device up-to-date for OS and securities patches from Apple. This and responsible browsing habits (e.g. avoid sites that offer free content that was not intended to be free from the people who actually own them)
Make sure you have your gatekeeper set correctly and do not download applications just because your were prompted to on any site, whether it's a unknown site or one you frequent.
Anatomy of OS X's Gatekeeper and Phony (and legitimate) Installers
Dismiss pop-ups where "mac support" informs you a virus or trojan was detected and then recommend you call them when they lock up your browser
force quit
Force quit a frozen app - Apple Support
and reset safari (relaunch it while holding down SHIFT) if you used it and it becomes unresponsive or continues to alert you of this ad generated con game.
for futher info on Safai behavior see this
If Safari doesn't load a page or webpage items are missing - Apple Support
for other browsers consult their webpage.
These are your first lines of defense. Any checking is secondary and not a routine.
If you need to check your system for adware, malware or general slowness I suggest etrecheck which can find and remove these infections and will also give you a system report that can be posted on these forums for analysis by volunteers here to assist you futher if you need it. The software is developed by a frequent contributor here.
The link is http://www.etrecheck.com.