Relative clauses in Russian are created by using the relative pronoun 'который'. This pronoun has adjectival endings and refers to the noun that comes directly before it. It agrees with this noun in gender and number but not case, since that is governed by its role in the clause.
Take these two sentences and the resulting relative clause that comes from combining them:
'Mужчина посещает музей.' - The man visits the museum
'Y музей много достопримечательности.' - The musuem has lots of attractions
'мужчина посещает музей, у которого много достопримечательности' - The man visits the museum which has lots of attractions.
Note how the relative pronoun agrees in gender and number with the noun before it but due to the preposition in the relative clause, its case is different and governed by the preposition.