What Do "White Hat" and "Black Hat" Mean?
These terms describe two different ways (and two opposite ethical and moral mindsets) to get websites to rank high in searches. Like in the old western movies, the white hats are the good guys and the black hats are the bad guys.
White hat web designers use ethical and legitimate techniques to build websites for real businesses that plan to be around for many years.
These sites are designed to last for the long term and remain ranked high due to the superior value and quality of their content, and their usefulness to consumers. White hat designers use reliable and proven ways to make their websites easy for search engines to understand and match with what people are searching for online. I use only 100% white hat web design, with great success.
The purpose of white hat web design is to make the best, highest quality website possible, and make sure search engines can easily tell how awesome it is. This is the basis of "search engine optimization" (SEO).
Black hat web designers use tricks and deception to make search engines think a website is far more valuable than it really is.
They are constantly seeking new ways to exploit loopholes in the ways website quality is determined. But the search engines work just as fast to close the loopholes, so these attempts to fool the system don't work for people who just need a normal, high-value, permanent website for a real-world business.
Black hat design can be considered "search engine deception". Such tactics are generally the realm of scammers selling get-rich-quick systems, weight-loss pills, and other similar things with websites that appear and disappear regularly. Sadly, some novice web designers seem to be falling victim to the lure of black hat techniques (primarily buying links) for their clients, perhaps not understanding the consequences.
The purpose of black hat web design is to get a website to show up very high in searches, period. Any means to accomplish that is acceptable. The site itself is secondary and might have content or might be a joke, or could even be a site designed to infect computers. The focus is trickery and deception of the search engines. Black hat tricks often result in websites that rank high for a short period of time then disappear. Certainly not what real businesses need! And remember, black hat designers don't believe in right and wrong, so there's nothing stopping them from ripping off their own clients too.
Footnote: Other Terms
You may hear the term "black hat SEO", which is an oxymoron. It doesn't make sense because black hat web designers aren't using "search engine optimization", they're using trickery, lies, and loopholes. Black hat web design is the opposite of search engine optimization, it's search engine abuse.
And then there's the term "gray hat", where I imagine someone would have to be ethical and unethical at the same time or something? Basically this is someone who does typical web design until they fall behind, then decide to give up and use a few black hat techniques. Since they're using black hat techniques, they are black hat designers. A gray hat is just someone struggling to accept that they've become a black hat.