Particles
は vs が
は marks what you are talking about; が points at who or what does it, especially when that is the news.
はがtopicsubject
Why this trips you up
English has one word for both jobs: the subject. Japanese splits it in two. は sets the topic, the thing the sentence is about, often something already known. が points at the one who does it or the thing that is there, and puts the spotlight on it.
The trap: both can sit right after the same word, so learners pick one at random. Two quick tests settle most cases: a question word (だれ, 何, どこ, どれ) is never followed by は, and the answer to it takes が.
は
the topic: "as for…"
Marks what the sentence is about, usually something already known or being introduced as the topic. What comes after は is the news. It also contrasts one thing with another.
わたしは学生です。
Introducing yourself: you are the topic, "a student" is the news.
今日は雨です。
肉は食べませんが、魚は食べます。
Two は side by side: contrast, "meat, no; fish, yes".
が
the subject: "it's X who…"
Points at who does it or what is there, and puts the weight on that word: the word before が is the news. Use it after question words, in answers to them, and for something you have just noticed.
だれが来ましたか。
A question word takes が, never は.
田中さんが来ました。
The answer to だれが keeps が: Tanaka is the news.
あ、雨が降っています。
Something you have just noticed: が.
Common traps
spot the correct oneWhich one is correct?
✗だれは来ましたか。
✓だれが来ましたか。
A question word (だれ, 何, どこ, どれ) is the unknown, so it can't be the topic: it always takes が.
Which one is correct?
✗「どの人が先生ですか。」「あの人は先生です。」
✓「どの人が先生ですか。」「あの人が先生です。」
A question asked with が is answered with が: あの人 is the new information, the one that answers "which person?".
Which one is correct?
✗見て!ねこはいますよ。
✓見て!ねこがいますよ。
Something you have just spotted is news, not a topic you were already talking about, so it takes が.
Recap
tap each one you can explainOh, the bus is here! Quick!
Excuse me, where am I? (What is this place?)
"Where is Tanaka?" "Tanaka is in a meeting now."
Who is the tallest in this class?
Who made this cake?
What is there in the fridge?
Nice to meet you. I'm Maria.
Look! There's a panda over there.
"Which one is your umbrella, Yamada?" "This one."
Which one is the cheapest in this shop?