Vague reference is a common problem in sentences where “this,” “it,” “which” or other such words don’t refer back to any one specific word or phrase, but a whole situation. “I hitchhiked back to town, got picked up by an alien spacecraft and was subjected to humiliating medical experiments, which is why I didn’t get my paper done on time.” In conversation this sort of thing goes unnoticed, but more care needs to be taken in writing. There are lots of ways to reorganize this sentence to avoid the vague reference. You could replace “which is why” with “so,” for instance.
Sometimes the referent is only understood and not directly expressed at all: “Changing your oil regularly is important, which is one reason your engine burned up.” The “which”refers to an implied failure to change oil regularly, but doesn’t actually refer back to any of the specific words used earlier in the sentence.
Sometimes there is no logical referent: “In the book it says that Shakespeare was in love with some “dark lady” .” This is a casual way of using “it” that is not acceptable in formal written English. Write instead “Arthur O. Williams says in The Sonnets that Shakespeare. . . .”
A reference may be ambiguous because it’s not clear which of two referents is meant: “Most women are attracted to guys with a good sense of humor unless they are into practical jokes.” Does “they’refer to “women” or “guys”? It would be clearer if the sentence said “Most women are attracted to guys with a good sense of humor, though not usually to practical jokers.”