The が particle marks the grammatical subject of the sentence, which is usually the thing performing the action, while を marks the direct object, which is usually the thing directly being acted upon. In English, we have for instance:
“I (subject) saw (verb) an apple (direct object)”.
And so in Japanese, keeping in mind that sentence order is subject-object-verb instead of subject-verb-object, we get
わたしが (subject) りんごを (direct object) みた (verb).
If you switch を and が in that sentence you’ll get “An apple saw me”, which would be a pretty creepy situation.
Some more Japanese examples which portray the difference:
魚が食べる。 (sakana ga taberu)
"Fishes are eating".
魚を食べる。 (sakana wo taberu)
"I'm eating fish."
As you can see, the sentences are more or less identical in Japanese, the only difference is whether が or を is used, but that difference alone makes the English sentences completely different. As I said, が tells us that Fish is the subject, that the fish is doing the verb (which is eat in this case). を however shows that the fish is the target of the verb.
I hope this clarifies your question and good luck with your studies!
arigato gozaimashita!!! that was actually so helpfulreina
Commented 1 month ago