Not all loss of traffic is due to getting a Google penalty. In fact, sometimes, the answer is much less scary. Sometimes it can be a reporting issue or glitch from your analytics software. Other times it can be a technical issue or coding malfunction on your website. A loss of traffic can also result from seasonality in your industry or topics within your industry being trendy or less interesting to the general public over time.
But having said that, if you have seen a sudden loss in traffic, and it has persisted for more than a few days, there is an extremely high probability that your website has been hit with a Google penalty. There are so many different penalties out there – from Panda to Penguin, to Hummingbird, to Possum – that it can be challenging to know which one you have been hit by. This is why we always recommend working with an SEO professional.