Examples

Example 1

A sparrow built a cozy nest out of twigs and cigarette butts in the tree outside of Jen's bedroom window.

Since we're not talking about a specific sparrow here, we use the indefinite article a. We are referring to a specific tree, though, so we use the definite article the to refer the tree outside of Jen's window. You know, the one filled with birds and garbage.

Example 2

Have you seen the giant foam finger I bought at the Lakers game last weekend? I can't seem to find it.

Nothing expresses your unwavering basketball fandom like an oversized, spongy digit. In this example, the definite article the is used to describe both the foam finger and the Lakers game because the speaker is referring to a specific foam finger (the one purchased at the Lakers game) and a specific Lakers game (the one last weekend).

Example 3

Todd claims a ghost lives in his underwear drawer. The ghost looks just like his late hamster, Giggles.

When the ghost is referred to a second time, however, we use the definite article the because we're referring to the individual ghost that has already been mentioned.