[noun] + を + [transitive verb] [noun] + が + [intransitive verb]
Many Japanese verbs come in pairs that share a kanji. The 他動詞 (transitive) says someone does something to an object, which takes を; the 自動詞 (intransitive) says the thing itself changes, and it takes が.
The particle belongs to the verb: を with the 他動詞, が with the 自動詞. Pairing the wrong particle with the wrong verb is the commonest mistake.
The endings follow a few patterns. A verb ending in 〜す is almost always the 他動詞, and one ending in 〜まる, 〜がる or 〜かる is almost always the 自動詞.
A 自動詞 with ている describes the state the change has left: the door is open, the light is on. A 他動詞 with ている describes someone in the middle of doing it. English "is open" pulls learners towards the 他動詞, which says something else.
The 他動詞 has its own state form, てある, for a state someone left on purpose: まど窓があけて開けてある, "the window has been left open".