Que is used when talking about the object of the sentence, which means the thing which is having something done to it. For example, "la personne que j'ai vue." Here, la personne is the one being seen, therefore they are the object and you use que.Qui is used when talking about the subject of the sentence, which means the thing which is doing the action. For example, "la personne qui est là". In this sentence, la personne is the one being there, therefore they are the subject and you use qui.An easy way to remember this may be that, if you only have a verb then you will probably need qui, while if you have a noun or pronoun you will more than likely need que. E.g. l'homme qui mange (only a verb in relative clause, therefore qui) l'homme que je connais (a pronoun in the relative clause, therefore que)However, this may not always be true, so always try to establish who is the subject and who is the object.