When using qui and que in a question, qui means who and que means what, e.g. "qui est cette femme?", "que devons-nous faire ce matin?". However, used as a pronoun, qui represents the subject, "voici le livre qui était sur la table" (here is the book that was on the table), whereas que represents an indirect object "j'ai vue une maison que je voudrais acheter" (I saw a house that I would like to buy).