White hat SEO refers to all the approved and recommended practices used to get a higher ranking on search results. This includes creating a better user experience, providing high-quality, relevant content and link building. On the other hand, black hat SEO includes all the practices used to get better ranking, but violate SEO rules provided. If you want to avoid being flagged and banned, you should avoid the slippery tactics of keyword stuffing, or purchasing backlinks.