Qui and Que are relative pronouns. That means that they are used to form one sentence out of two different ones to avoid repetition. Although both pronouns serve the same purpose, they are used for different functions. "Qui" is the pronoun used to define the subject of the sentence and is followed by a verb, and "Que" refers to the direct object of the sentence which precedes a subject.
For example: "L'hommemarche dans la rue. L'homme est grand." = "L'homme quimarche dans la rue est grand." "As-tu lu le livre? Je te l'ai donné hier" = "As-tu lu le livre que jet'ai donné hier?"
Note: Although these pronouns are invariable and are not affected by number or gender, qui never changes but que does become qu' when succeeded by a vowel. "Elle a aimé le film qu'elle a vu hier qui a été dirigé par Steven Spielberg".