Black hat techniques are very questionable tactics used to get you ranked that can get you penalized. White hat techniques are good techniques you can use to get yourself ranked without any worry of getting penalized. Gray hat techniques lie somewhere between the two.