In computer security, the term Black Hat is used to describe a cyber-criminal in one war or another. White Hat is used for security experts who specialize in protecting systems against attacks and penetration attempts.
A Black Hat - in computer terms - can be guilty of a variety of unethical actions. For example, a Black Hat may be a hacker who employs the use of social engineering by phone or e-mail to trick employees or other personnel at an organization to hand over sensitive information. They may also check an organization’s systems for known vulnerabilities and weakness, or use denial of service (DoS) measures to attack an organization.
Black Hats also include authors of malware such as viruses, trojans, rootkits and fake scamware products (FakeAV etc.). A Black Hat may also be responsible for spam, or manipulating search engine results using what's known as "Black Hat SEO" (search-engine optimization) to put malicious results to the top of the list for popular keywords.
Basically put, the Black Hats in the digital world, are the bad guys.