Who is used for people. Which is used for things, and that can be used for either.
An interesting statement I found regarding such topic:
It is quite unfashionable to use that for people. (The consensus seems to be that using that for people is still acceptable in speech and informal writing, but you should avoid doing it in formal writing.)
- That's the guy who
- That's the guy that
As you can see, there is no big secret about it nor complex rules.
However, I when in a more formal context would rather use who
instead of that
Reference: http://www.grammar-monster.com/lessons/ ... at_who.htm
Tópico relacionado: that-x-which-x-who-significado-de-que-qual-a-diferenca-t1705.html