Basically, white hat refers to techniques that conform to the rules (in this case specified by the search engines). White hat seo focuses on creating a good user experience and on organic link growth. I.e. the focus is on creating great content that people want to link to, so white hat seo (apart from the technical side) typically involves content writing, social media marketing, identifying and contacting link targets, etc.
On the other hand, black hat refers to using techniques that are specifically prohibited. Thankfully, these days black hat seo is not really as beneficial as it once was (at least not in Google). Examples of black hat techniques are keyword stuffing (completely ineffective these days), doorway passages, or purchasing links (this works if you dont get caught). Nowadays, black hat techniques, with the exception of link purchasing, are usually limited to trying to make a short term profit before the site gets nailed.
In the field, we also use the term grey hat. Grey hat refers to techniques that are not necessarily prohibited but are likely to be forbidden in the future (thereby risking that the sites will be penalised in the future). Usually it involves a loop hole or something the rules did not think of mentioning or abuse of a certain technique. For example, recent Google updates have begun to penalise over-optimised sites even though they did not really break the previous rules, they only ignored the advice that sites should be built primarily for users. The algorithm now looks for certain signals, like over-optimised anchor text, unnatural backlink profiles, and so on.
Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content. Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.