What is the line between black hat and white hat link buying?

Ive seen it recommended and posted multiple times in the what hat seo forum that ppl suggest buying links… i thought that this was black hat practice ? Or are they talking about PR releases and guest posting ?

Im trying to figure out if buying links can fit into my white hat seo link building strategy, and how to make sure i dont receive and penalties down the road