'Qui' and 'que' are both relative pronouns, which we use to replace the subject of a sentence, and hence avoid excessive repetition which might seem unnatural in that sentence. To be able to know when to use each one, you should remember that 'qui' is always followed directly by a verb, for example: 'c'est mon petit frère qui doit faire la vaisselle aujourd'hui'. Whereas, 'que' is followed by a subject (je, tu, il/elle, nous, vous, ils/elles), and then a verb: 'je dois faire attention aux cours que je prends'.Try to see the difference between 'c'est la fille que j'aime' and 'c'est la fille qui ne m'aime pas'.