Relative pronouns are used to introduce relative clauses. They refer to place and time by replacing the subject expressed in the main clause to avoid the repetition of it in the relative clauses.
External link to: Relative Pronouns of Place and Time Topic.