Although AdwareMedic functions somewhat like anti-virus software, it’s important to understand that it is not anti-virus software! It does not remove any real malware – only adware. If you think you may be infected with actual malware, be aware that there is nothing that can reliably remove all malware. For more information, see The Safe Mac’s Mac Malware Guide and the article How to remove infected files.
It is also important to understand that AdwareMedic does not protect you against adware. AdwareMedic simply removes adware. Using AdwareMedic will not prevent you from being "infected" with adware again in the future. For that matter, neither will using anti-virus software; only a change in your online habits can keep you safe.
If you are leery of using unfamiliar software to remove a problem caused by downloading some other unfamiliar software - which is a perfectly reasonable thing, and is a precaution people should take more often - then you can follow the manual removal instructions in my Adware Removal Guide instead. This guide is kept in sync with everything AdwareMedic removes.
What is adware?
Adware is unwanted software that uses sneaky and dishonest methods to get installed on your computer, and then changes the behavior of your web browser. Once installed, it does things like injecting advertisements into web pages, causing pop-up windows or tabs to open to advertising sites, and changing your home page and/or search engine.
Although adware sounds like malware, there is a crucial difference: adware on the Mac has never been documented to involve keylogging, back doors or any other such malicious activities... just unwanted advertising. As such, most anti-virus software doesn't bother to detect most adware, and if it does, it doesn't do a very comprehensive job of detecting it. This is where AdwareMedic comes in - it detects the adware that anti-virus software doesn't.
Where did it come from?
The short answer: from an installer for some app you were tricked into downloading from an unsavory site. This may be a site like Download.com or Softonic, or a site offering streaming of "free" videos, or from a piracy site or torrent, or something else similar.
For more information on how to avoid this sort of thing in the future, see Mac Malware Guide : How do I protect myself?.