White Hat Hacker
A white hat hacker, also rendered as whitehat or white-hat, is in the realm of information technology, a person who is ethically opposed to the abuse of computer systems. Realizing that the Internet now represents human voices from all around the world makes the defense of its integrity an important pastime for many. A white hat generally focuses on securing IT systems, whereas a black hat (the opposite) would like to break into them but this is a simplification. A black hat will wish to secure his own machine, and a white hat might need to break into a black hat's machine in the course of an investigation. What exactly differentiates white hats and black hats is open to interpretation, but white hats tend to cite altruistic motivations.
Grey or Brown Hat Hacker
A hacker of this type is a skilled hacker who sometimes acts legally and in good will and sometimes not. They are a hybrid between white and black hat hackers. They hack for no personal gain and do not have malicious intentions, but occasionally may or may not commit crimes in their actions. There is no distinction between grey and brown for hackers in this category.
Black Hat Hacker
A black hat or black-hat hacker is a malicious or criminal person, which some in the computer industry would rather label "cracker". That said, the term hacker is also commonly used in mainstream media as a synonym for "black hat hacker". However, in computer jargon, the meaning of "hacker" is much more broad. Usually a Black Hat refers to a person that maintains knowledge of the vulnerabilities and exploits they find as secret for private advantage, not revealing them either to the general public or manufacturer for correction. Many Black Hats promote individual freedom and accessibility over privacy and security. Black Hats may seek to expand holes in systems; any attempts made to patch software are generally to prevent others from also compromising a system they have already obtained secure control over. A Black Hat cracker may have access to 0-day exploits (private software that exploits security vulnerabilities; 0-day exploits have not been distributed to the public). In the most extreme cases, Black Hats may work to cause damage maliciously, and/or make threats to do so for blackmail purposes.