Pronouns come in cases. A case of pronouns is a list of pronouns used to replace a noun that acts as a certain part of speech. If you want to use a pronoun to replace a noun that is the subject of a sentence, you must select the appropriate pronoun from the subject case of pronouns. A noun that is acting as the direct object of the sentence can only be replaced by one of the pronouns from the direct object case.
A noun can play several different roles in the sentence. It can be the subject, direct object, indirect object, object of a preposition, or something with a scary name called a predicate nominative. Which pronoun you use to replace a noun depends on what role the noun is playing in the specific sentence you are analyzing.