As a basic rule: The subject is the person or thing doing something. The object is having something done to it.
What is an object and examples?
An object can be a single-word noun (e.g., dog, goldfish, man), a pronoun (e.g., her, it, him), a noun phrase (e.g., the doggy in window, to eat our goldfish, a man about town), or a noun clause (e.g., what the dog saw, how the goldfish survived, why man triumphed).
What is subject verb and object in a sentence?
Subject: who/what the sentence is about. Verb: What the subject does/is. Object: a person or thing that is affected by the action of a verb.