What this is
French splits “who/what” questions three ways depending on two things: whether you’re asking about a person or a thing, and whether the thing you’re asking about is the subject or the object of the sentence. qui covers people either way. que and quoi cover things, but which one you use depends on where in the sentence the answer belongs.
The rule
qui (who) doesn’t care about subject versus object — same word, either role:
Qui travaille aujourd'hui ? Who's working today? (qui = subject)
Qui cherches-tu ? Who are you looking for? (qui = object)
que (interrogative what) only asks about the object, and it always forces something after it — inversion or est-ce que. It can never be the last word of a sentence:
Que fais-tu ? What are you doing?
Qu'est-ce que tu fais ? What are you doing? (same question, est-ce que frame)
For the subject, que doesn’t work at all — French uses the fixed phrase qu’est-ce qui instead:
Qu'est-ce qui est facile ? What's easy? (the thing is the subject)
Qu'est-ce que tu cherches ? What are you looking for? (the thing is the object)
Look closely: qu’est-ce qui for the subject, qu’est-ce que for the object. The qui/que distinction from the very first rule of this concept is still doing the same job, just tucked inside a fixed frame.
quoi is what shows up when the question word can’t sit in that position at all — standing alone, following a preposition, or ending a casual spoken question:
Tu cherches ? Quoi ? You're looking for something? What?
Tu as besoin de quoi ? What do you need?
Tu cherches quoi ? What are you looking for? (casual, no inversion needed)
Why it works this way
que’s restriction against sentence-final position isn’t arbitrary — que is what’s called a clitic, a word that leans on what follows it and cannot stand alone. quoi is its independent counterpart, the form French reaches for whenever there’s nothing for que to lean on. This is the same logic behind why English “who” survives at the end of a sentence (“Who are you talking to?”) while a form like “whom” feels formal precisely because of its own attachment behavior — different mechanism, same underlying idea of a word that needs support.
Edge cases
Interrogative que is not the same word as restrictive que
M5 already gave you a que: the one in ne…que, meaning “only.” This concept’s que is a completely different word that happens to be spelled identically — asking “what,” not restricting anything. Que cherches-tu ? Je ne cherche que des amis uses both in the same exchange, doing unrelated jobs. Context (and the presence or absence of ne) always disambiguates them, but it’s worth noticing they’re not secretly the same rule wearing two hats.
qu’est-ce qui and qu’est-ce que are not interchangeable
They look one letter apart and mean genuinely different things: qui asks about the subject, que asks about the object. Swapping them produces a sentence that either doesn’t parse or asks something else entirely. When in doubt, find the verb first and ask whether you’re asking about the thing doing the action (qui) or the thing receiving it (que).
What English speakers get wrong here
English “what” does the job of que, quoi, qu’est-ce que, and qu’est-ce qui all at once, so English speakers default to reaching for a single word and bolting it wherever a French sentence seems to want a question word. The two things to check every time: is this “what” about the subject or the object (that decides qu’est-ce qui vs qu’est-ce que), and does the que actually have something after it to lean on (if not, it has to be quoi).