A malicious hacker. Refers to color-coded hats in old western movies: bad guys wear black and good guys wear white. Compare to white hat.