Get rid of Flash for starters, that eliminates Flash ads from running on your site. You may also want to try UBlock Origin and Ghostery to block ads and trackers, but be sure to whitelist the sites you care about so they don't go out of business.
If you're looking for best practices, one main thing to lookout for is when you install software, you download it from a safe source and uncheck all the additional installations it's trying to pass by you. Most of the time those additional installers contain adware. In other cases there are browser plugins that get installed to control that, depending on the browser you use try the safe browsing option. Google for example continually monitors and blocked a bunch of ad injection plugins in the past.
If you currently have adware, you can scan your machine with a malware scanner such as Malwarebytes https://www.malwarebytes.org/ and probably clean up some browser settings (fastest is to reset browser to default/original settings, but any customizations/plugins you use would be removed). Alternatively you can search for the name of the particular adware you have for manual removal steps, it's a longer route but with a cleaner result.