One should see that the relative pronouns can refer to a concrete noun in the main clause or to an idea.
What is referenced?
Referencing a noun in the main clause
Do you see the man, who stole my money yesterday?
Referencing an idea
He never believed, what she told him.
Nominative, genitive, accusative, dative
One must see that concerning declension only the function of the relative pronoun inside the relative clause is to be considered, the function of the referenced noun in the main sentence has no importance in that context.
Nominative, genitive, accusative, dative
a1) The man who crosses the street is my uncle.
a2) The man whose car has been stolen is my uncle.
a3) The man that I see is my uncle.
a4) The man to whom I give the money.
b1) I see the man who crosses the street.
b2) I gave my watch to the man who crosses the street.
b3) The car of the man who crosses the street has a flat tire.
In the a) sentences the man is always the subject of the main clause, nominative, but this is irrelevant for the relative clause. In the relative clause the man is nominative (a1), genitive (a2), accusative (a3) or dative (a4). In the sentences b) the man is always subject, nominative, in the relative clause, but in the main clause he is accusative (b1), dative (b2) or genitive (b3).
With and without preposition
Relative pronouns can be used together with prepositions as well.
The knife with which he buttered the bread was black.
The chair upon which he sat down broke down.
restrictive and non restrictive relative clauses
This distinction is not really important concerning learning Italian, but in one case it is crucial to understand the difference between a restrictive and a noun restrictive relative clause. Let's see first what's the difference. Have a look at this sentence.
The men who smoke too much will get ill from cancer.
This sentence can be understood in two different ways, as we can see, if we change them a bit.
a) Those men who smoke too much will get ill from cancer.
b) All the men, who always smoke too much, will get ill from cancer.
We see that these sentences doesn't mean the same thing and that the original sentence could have the meaning of a) and of b). In case of a) we have a restrictive relative clause which adds an essential new information to the sentence. Not all the men are concerned, but only the men who smoke too much. Due to the fact that the relative clause restricts the group concerned we call this type of relative clause restrictive. Case b) is different. In this case, really all men are concerned because all of them smoke too much. We call this typ of relative cause non restrictive because no restriction is made.
A non restrictive relative clause just adds an extra information to the sentence, but doesn't change the meaning of the main clause. In other words you can omit it without changing the meaning of the sentence.
Goethe, who was born in 1749, was older than Schiller.
Here as well we have a non restrictive relative cause because the relative clause just adds some information, but we can omit it without changing completely the meaning of the sentence (Goethe was older than Schiller).
In this case, the situation is different.
The man who crosses the street is a friend of my mother.
Here we have a restrictive relative clause, the relative clause is essential for the understanding of the sentence. If we omit it, everybody would ask himself about which man we are talking.
If you want to find out if a relative clause is restrictive or non restrictive you just have to omit the relative clause. If the meaning doesn't chance and only some information get lost it is a non restrictive relative clause. If the meaning changes completely or you get a sentence where you have the impression that some essential information is missing you have a restrictive relative clause.
a) Dante Alighieri, the greatest Italian poet, lived from 1265 until 1321.
b) The apples which have been genetically manipulated can't be sold in Europe.
In sentence a) you can omit the relative clause, we already know who is Dante Alighieri, the relative clause just adds some extra information. Without the relative clause we get this sentence.
Dante Alighieri lived from 1265 until 1321.
Sentence b) is completely different. If we omit the relative clause we get a sentence with a completely different meaning.
The apples can' t be sold in Europe.
The meaning of this sentence would be that apples can't be sold in Europe.
The distinction is important in English as well. Normally a restrictive clause is introduced with that and a non restrictive clause with which.
The statue of Michelangelo, which can be seen in Florence, is very famous.
The statue of Michelangelo, that can be seen in Florence, is very famous.
Summary: It is crucial to understand that the declension of a relative pronoun depends only on its function inside the relative clause. Together with prepositions in italian special pronouns are used.