In linguistics, anaphora has a different meaning. It still comes from the Greek literal sense "carrying back", but means a word that refers back to an earlier word or referent. An anaphoric word is called an anaphor, and anaphora is the abstract idea. It is common for pronouns to be used anaphorically.

I was talking to Mary, and she told me....

In this, Mary is newly introduced, and the she refers back to what is now a known element in the discourse.

Note however that me is not anaphoric: it does not specifically point back to the earlier occurrence of I; rather, both pronouns refer to the same person in the same way. I/me are examples of the deictic or indexical use, which is different from the anaphoric.

Anaphora refers back to something introduced in the discourse, whereas deixis (the use of deictic forms) points out something in the world.

Reflexive pronouns are anaphoric in that the agent is first named, then the action is something they do to themself, not to another.

Anaphoric uses:
The boy and his horse
John cut himself.
I opened the door, and then realized something was wrong.
The window was already open, and that confused me.
Here are three apples: take one.
We arrived by the river, and here set up camp.
She said she'd fix it, and did.

Deictic uses:
He's the thief!
We camped here.
How are you?
That looks interesting.

Anaphora can point forward, in which case it is sometimes called cataphora. In When he finished speaking John left the room, it is ambiguous who he refers to. It may anaphorically refer to another man mentioned in a previous sentence, but if it refers to John, it is cataphora.

In modern theories of syntax, such as those of Noam Chomsky, the term 'anaphora' is restricted to words that are intrinsincally anaphoric, that is 'each other', 'one another', and all the pronouns ending in 'self'. These must have, by their very form, referents earlier in the sentence. Well, usually earlier: interesting problems of description arise from the fact that A picture of himself would please John is grammatical.

It is possible for noun phrases to be anaphoric. Expressions such as 'the fool' can behave like pronominal anaphors: John broke the teapot and the fool thought no-one would notice.