White hat SEO refers to search engine optimization which is search engine friendly, or in other words tactics of SEO which won't get you penalized.
Google likes white hat SEO techniques because they don't set out to game their system. A lot of white hat techniques are not even thought of as being SEO related many times because these include things which webmasters would do anyway.
If you have a recipe site and put together a great recipe for chocolate chip cookies, you might get a few people linking from their websites to your page which has the recipe on it because they want to share your great recipe with their audiences.
That webmaster likely isn't thinking of helping your website rank better, they just want to share great content with their own visitors, and yet at the same time that link is going to improve your ranking in Google because it's like that other webmaster is giving a virtual thumbs up to and vouching for your page. This is how the Internet was meant to function with people linking to and sharing good content with everyone else.
Examples of White Hat SEO
Keyword Usage – You can abuse keywords or you can use them effectively. White hat keyword usage: putting your keywords in your title, meta description, and keywords areas for each new post or page your create on your site and using it with LSI keywords throughout that page and occasionally when linking to that page on and off your site as the anchor text. Black hat keyword usage: keyword stuffing and anchor text over optimization.
Link Bait – Creating link bait is easily one of the best things you can do from a white hat SEO point of view. Link bait simply means content which easily attracts links from other webmasters because it's content which is both exclusive to your site and valuable to an audience which is why other webmasters will want/have to link to it.
The best links are those which you don't have to create yourself. Anyone can do that, and Google knows it. What impresses them is when you EARN a link from another website because of your content, hence the importance of link bait.
Grey Hat SEO
These are methods which once were considered to be white hat but were abused in order to improve rankings by many webmasters and SEOers, so now it's a bit more borderline, especially because these are links you can create yourself:
Guest Blogging – Guest blogging is still okay in Google's eyes so long as you do it for the right reasons. This means that you're guest blogging to network and get your content in front of a new audience and the traffic that will bring as opposed to being for just getting a DoFollow link. Google has even suggested that guest blogging go to a NoFollow format to dissuade people from using guest blogging for the SEO impact.
Blog Commenting – Leaving a comment on someone's blog will typically only net you a NoFollow link these days, but it's still a valuable source of traffic, particularly if you get in early and leave a very insightful comment.