can refer to a person, place, or thing and means that, which, who, or whom.
Que, the shortest relative pronoun, is used when the relative pronoun comes immediately after the antecedent. Nothing separates the relative pronoun from the antecedent, not even a comma.
La mujer que vive allí es mi tía.
The woman that/who lives there is my aunt.
El hombre que ves en la foto es mi hermano.
The man (whom) you see in the photo is my brother.
El café que te gusta está allá.
The café (that) you like is over there.
El libro que prestaste es mío.
The book (that) you borrowed is mine.
Que can also be used after a very short separation from the antecedent when referring to places or things. However, if the relative pronoun follows a preposition and refers to a person, you must use quien.
Ésta es la casa en que crecí.
This is the house in which I grew up.
¿Has ido al café del que hablaba?
Have you been to the café (that) I was talking about?
No es la mujer con quien hablé.
She isn't the woman (whom) I talked to.