The 「は」 particle is used to indicate that a new topic (subject, object) has been introduced to the conversation. A pointer that emphasises an object to focus on during later parts of the conversation. This is the “topic” particle.
Me) 食べた? — Did you eat?
You) 食べた。 — I ate.
(the presumed topic is “you”)
Me) アリスは食べた? — Did Alice eat?
You) 食べた。 — She ate.
(the topic is set to アリス)
The 「が」 particle is used when the topic is unknown and needs to be identified.
Me) 誰がチキンを食べた? — Who ate the chicken?
You) アリスが食べた。 — Alice [is the one who] ate it.