Black hat SEO refers to aggressive techniques that focus only on search engines and not users, and may violate search engine guidelines. Examples include keyword stuffing and invisible text. Black hat is used for quick financial returns rather than long-term investment. It risks websites being banned but is considered an acceptable risk. White hat SEO refers to techniques that focus on users and follow search engine guidelines, like using keywords and backlinks appropriately. White hat is used for long-term website investment and is considered ethical.