There are two types of Google penalties which are as follows.
Manual Penalties
Google employs search quality raters who are given actual searches to perform, drawn from real searches that happen on Google. This name is derived as they rate the quality of pages that appear in the top results. It's impossible for algorithms to detect all types of violations perfectly. Quality raters evaluate the websites which can then be flagged as potential guideline violators. If quality rater notice something fishy going on, they can immediately give you a penalty. The best part is that unless you do something shady on purpose, you will never face a manual penalty.
Algorithmic Penalties
If you think you have a penalty but unable to figure out any manual actions which has violated guidelines, it's probably an algorithmic penalty. Google has created different algorithms over the years to detect spam and other violations, and if it catches something it will then penalize the site. You will have to perform a bit of investigating to figure out what your penalty is caused by which is the most annoying part about these penalties as you don't get a clear message about it.
You should have a good idea of why you were penalised. Some problems are simple to understand. If you have got unnatural links pointing out, cut back the amount of links you have got in your content, and don’t link intent on too several low-authority sites. If you have got spam on your website (comments, user-generated content), delete it, and stay on the top of it within the future. Google's main aim is to help users find exactly what they're looking for. Duplicate content is easy to fix in most cases. You can just simply delete it or add a canonical link. It's important to understand both Panda and Penguin are algorithmic penalties when you fix errors. Most SEO experts should not spent time removing low-quality links instead invest time into attracting more high quality backlinks. Always try to find an explanation as to why this issue came up in the first place and then try to fix it with different methods.