A white hat hacker is someone who fix the system, who patch system, notifying the system owner what are the problems that needs to be fixed. A black hat hacker is someone who use those loopholes for their own benefit without notifying the person maintaining the system.