This is the 107th most frequent Russian word.
которой
The Russian word "которой" means "which" or "whom" (feminine, instrumental or genitive case) in English.
In this sentence, 'которой' is a feminine relative pronoun referring to 'Учительница' (teacher), and it's in the dative case, as it's governed by the preposition 'к' (to).
Учительница, к которой я подошёл, очень добра.
The teacher whom I approached is very kind.
Here, 'в которой' operates as a relative pronoun phrase referring to 'Город' (city), and it's in the prepositional case due to the preposition 'в' (in).
Город, в которой я родился, находится далеко.
The city where I was born is far away.
The word 'которой' is used here as a relative pronoun to introduce a subordinate clause that provides additional information about the noun 'книга' (book). It specifically connects to the preposition 'о' (about), and thus the correct case is instrumental.