Who is used for people and which for things or animals.
Examples:
1) He is the man who caught the terrorist.
2) My uncle who is in the army is coming tomorrow.
3) This is the same dog which bit the old woman.
4) The gun which my grandpa used in World War 2 will be auctioned.
5) I am getting the same scary feeling which I get when I am alone in the dark.
Thus, who and which serve similar purpose in a sentence, by adding meaning or characteristics to person or thing being discussed. Only, ‘who’ is used for persons and ‘which’ for all else.