が (GA) is used to mark the subject in the sentence. は (WA) can be used too when the subject is also the topic of the sentence.
携帯電話の電池が切れている。
Keitai denwa no denchi ga kirete iru.
The phone battery has run down.
2.
The particle が (GA) is often used with ある (ARU) or いる (IRU) to mark the object of the sentence. ARU is used with inanimate entities (car, food, plants, etc.), and IRU with animate entities (animals, humans).
NOTE: the polite forms for ARU and IRU are ARIMASU and IMASU.
庭に猫がいます。
Niwa ni neko ga imasu.
There’s a cat in the garden.
3.
After interrogative pronouns (what, who, etc.) in questions, が (GA) is always used, never は (WA) because if we ask a question about the element related to the question, it means that this element has not been identified yet. It's a new element introduced in the conversation.
誰があなたの友達ですか。
Dare ga anata no tomodachi desu ka.
Who is your friend?
4.
The particle が (GA) can be used with verbs or adjectives of desire, capacity, necessity, perception and emotion to mark the object.