Interrogative pronouns: (questions)
Qui = Who ... SUBJECT 1) Qui est ton professeur? (Qui est-ce qui est ton professeur?) = Who is your teacher?
Que = What... OBJECT 2) Qu'est-ce que vous faites? (Que faites-vous?) = What are you doing?
Relative pronouns (generally the same principle as above but used here as connectors to make relative clauses (make the sentence longer)):
Que: used as Direct Object - what, which, that
Qui: used as Subject - who, which, that
e.g. Mon frère, qui joue au foot, a perdu le roman que j'avais acheté hier.