Many people have very vague understanding of the difference between「は」and「が」. So let me explain when we use「が」:
1) As topic marker
2) With question words
3) For emphasis
4) Used in place of 「を」
5) Used in subordinate clauses
1) As a topic marker
「は」 is used to mark something that has already been introduced into the conversation, or is familiar with both the speaker and the listener (proper nouns, generic names, etc.) 「が」 is used when a situation or happening is just noticed or newly introduced. See the following example:
In the first sentence, 「一人の日本人」 is introduced for the first time. It is the subject, not the topic. The second sentence describes about 「日本人」 that is previously mentioned. 「日本人」 is now the topic, and is marked with 「は」 instead of 「が」.
2) 「が」 with question word
When a question word such as "who" and "what" is the subject of a sentence, it is always followed by 「が」, never by 「は」 To answer the question, it also has to be followed by 「が」.
3)「が」 for emphasis
「が」 is used for emphasis, to distinguish a person or thing from all others. If a topic is marked with 「は」, the comment is the most important part of the sentence. On the other hand, if a subject is marked with 「が」, the subject is the most important part of the sentence. In English, these differences are sometimes expressed in tone of voice. Compare these sentences.
先生はNTUCに行きました。 Sensei went to NTUC.
先生がNTUCに行きました。 Sensei is the one who went to NTUC
4) 「が」 in a special circumstance
The object of the sentence is usually marked by the particle "を," but some verbs and adjectives (expressing like/dislike, desire, potential, possession, necessity, fear, envy etc.) take "が" instead of "を."
Nintendo 3 DSが欲しいです。 I want a Nintendo 3.
中国語が分かります。 I understand Chinese.
ハイネケンが好きです。 I like Heineken Beer.
5) 「が」in subordinate clauses
The subject of a subordinate clause normally takes 「が」 to show that the subjects of the subordinate and main clauses are different.
私は彼女が結婚したことを知らなかった。 I didn't know that she got married.