In short:
1.
Who is used to refer to people -> use
whom after prepositions
2. Which is used to refer to animals / things / parts of a sentence
3. That can sometimes -but not always!- be used to replace who or which
4. Whose indicates possession of either a person or a thing