Google spam penalties can be automatic or manual. With manual penalties, you’ll probably be informed by way of notification in Google Webmaster Tools.
Google SEO
7 Ways to Protect Your Site from Google Algorithmic Changes
The only way to know if you’re violating Google algorithmic rules is to stay up-to-date on the changes. Moz’z algorithm change log gives you an up-to-minute reporting on every algorithm change.