When you’re writing, sooner or later you’re going to use a pronoun: he or she, him or her, we or they, and so on. A pronoun must always have an antecedent (from “ante”—to participate in a poker game, and “see dent,” to park your car in a crowded lot, thus, “ante see dent”—to bet that you’ll find a dent in your brand new car when you return). The antecedent is the noun that the pronoun substitutes for.*
The instructor gave a boring lecture. It made me yawn.
What does “it” mean? As a pronoun, it has to refer to a noun somewhere. Generally speaking, pronouns refer to the closest preceding noun that matches it in both gender and number. Since “it” is gender neutral, and it’s also singular, just look for the item in the preceding sentence that is a single thing. (This is as opposed to the instructor, who presumably is either male or female. Usually.) In this case, the preceding singular genderless thing is “lecture,” so “it” refers to lecture. Thus, the sentences could be written as:
The instructor gave a boring lecture. The lecture made me yawn.
So why use a pronoun if the two mean the same thing? It’s because you’ll make your readers yawn if you keep repeating the noun over and over. For example:
The instructor gave a boring lecture. The lecture made me yawn because the lecture lasted for forty-five minutes. The lecture was so boring that I fell asleep during the lecture instead of listening to the lecture.
I’m yawning myself. Now see how much less, well, boring it is when pronouns are used appropriately:
The instructor gave a boring lecture. It made me yawn because it lasted forty-five minutes. It was so boring that I fell asleep during the lecture instead of listening to it.
Notice that I didn’t substitute pronouns for every instance of “lecture.” All it takes is substituting for most of them so there’s not a constant stream of “the lecture,” “the lecture,” “the lecture”…
It’s easy to have a pronoun accidentally refer to the wrong noun—this is an “antecedent” problem, which does not mean you don’t have enough cash to cover your poker bets. For example:
The man and his dog Spike went for a walk before he drove into the city.
With this sentence, “he” technically refers to the closest male singular noun…which means Spike, the dog. Hmmm. Not sure about your dog, but mine doesn’t drive a car!
The bottom line is to make sure your pronouns refer to the person or thing you want them to. Don’t make the reader wonder if Spike is the Wonder Dog.
And don’t park your brand new car in that crowded lot!