In the Japanese language, particles are small grammatical elements that are used to indicate the relationship between words in a sentence. Two of the most important particles in Japanese are を (wo) and が (ga).
を (wo) is used to mark the direct object of a sentence. It indicates the thing that is being acted upon by the subject of the sentence.
Example 1: りんごを食(た)べました。- I ate an apple. (The object being eaten is “りんご,” marked by the particle “を.”)

じゃあ私(わたし)はこいつを警察(けいさつ)に届(とど)けるので!- Well then, I will take this guy to the police…
MHA Volume 1 Chapter 1 page 31
が (ga) is used to mark the subject of a sentence. It indicates the person or thing that is doing the action described by the verb.
Example 2: 課長(かちょう)、私(わたし)がやりますよ。Boss, I will do that. (The subject performing the action is “私,” marked by the particle “が.”)
Example 5: 私(わたし)が来(き)た! – I came (I’m here)
MHA Volume 1 Chapter 1 page 19

Both が and を can ba omitted in casual speech and sentence won’t loose it’s meaning.
It is important to note that in Japanese, the subject and object can be switched around in a sentence depending on the context, and the particles を and が will change accordingly. Additionally, there are other uses for these particles, such as を indicating a place of movement or direction and が being used to indicate emphasis or contrast. However, their basic functions as markers of the direct object and subject of a sentence respectively are fundamental to understanding the Japanese language.
