Note: は replaces が or を when topicalizing; it can co-occur with other particles (e.g., には, では, からは).
The particle は (pronounced "wa") is the topic marker in Japanese. It marks the topic of a sentence – the thing being talked about. It often translates to "as for ~" or "speaking of ~" in English, though in natural translation it is usually left untranslated.
The most basic use of は is to establish what the sentence is about. The topic is typically something already known or shared between speaker and listener.
The topic does not have to be the grammatical subject. It can be any element that the speaker wants to comment on:
Even a single は can imply contrast with something unstated. The listener understands that the speaker is distinguishing the topic from other possibilities.
In negative sentences, は often replaces を or が to add a contrastive or softening nuance. Compare:
A common source of confusion is choosing between は and が. As a general guideline: は marks known/old information that sets the scene, while が marks new/unknown information or identifies something specific. For example, だれ誰がきました来ましたか。 (Who came?) uses が because the answer is unknown, while the reply たなか田中さんがきました来ました。 also uses が to identify the specific person.