A relative pronoun is a pronoun that introduces a relative clause. It is called a "relative" pronoun because it "relates" to the word that its relative clause modifies. Here is an example:

  • The person who  phoned me last night is my teacher.

In the above example, "who":

  • relates to "The person", which "who phoned me last night" modifies
  • introduces the relative clause "who phoned me last night"

There are five basic relative pronouns: whowhomwhosewhichthat*

Who  (subject) and whom  (object) are generally only for people. Whose  is for possession. Which  is for things. That  can be used for things and  people only in defining  relative clauses (clauses that are essential to the sentence and do not simply add extra information).**

Relative pronouns can refer to singular or plural, and there is no difference between male and female.

Look at these examples showing defining and non-defining relative clauses:

 example sentences
S=subject, O=object, P=possessive
notes
defining relative clausesS- The person who  phoned me last night is my teacher.
- The person that  phoned me last night is my teacher.
"that" is preferable
- The car which  hit me was yellow.
- The car that  hit me was yellow.
"that" is preferable
O- The person whom  I phoned last night is my teacher.
- The people who  I phoned last night are my teachers.
- The person that  I phoned last night is my teacher.
- The person I phoned last night is my teacher.
"whom" is correct but formal

relative pronoun is optional
- The car which  I drive is old.
- The car that  I drive is old.
- The car I drive is old.
"that" is preferable to "which"

relative pronoun is optional
P- The student whose  phone just rang should stand up.
- Students whose  parents are wealthy pay extra.
 
- The police are looking for the car whose  driver was masked.
- The police are looking for the car of which the driver was masked.
"whose" can be used with things

"of which" is also possible
non-defining relative clausesS- Mrs Pratt, who  is very kind, is my teacher. 
- The car, which  was a taxi, exploded.
- The cars, which  were taxis, exploded.
 
O- Mrs Pratt, whom  I like very much, is my teacher.
- Mrs Pratt, who  I like very much, is my teacher.
"whom" is correct but formal

"who" is common in spoken English and informal written English
- The car, which  I was driving at the time, suddenly caught fire. 
P- My brother, whose  phone you just heard, is a doctor. 
- The car, whose  driver jumped out just before the accident, was completely destroyed.
- The car, the driver of which jumped out just before the accident, was completely destroyed.
"whose" can be used with things

"of which" is also possible

*Not all grammar sources count "that" as a relative pronoun.
**Some people claim that we should not use "that" for people but must use "who/whom". There is no good reason for such a claim; there is a long history of "that" for people in defining relative clauses from Chaucer, Shakespeare and the Authorized Version of The Bible to Fowler's  and Churchill.

sources : Original Link