In linguistics, a trace is what is left behind by a word that is moved, especially in constructing questions.

Contrast the following pair of sentences:

Alice and Bob are going to the store.
Who do you wanna go with?

I'm going to the store, and Alice or Bob can go too.
Who do you wanna go with you?*
Does the last sentence sound wrong? It should - it violates the natural grammar of english. When you form a question, the question word is usually the object of a verb in the sentence. The first question could be rewritten as:
You want to go with who?
Admittedly, that sounds strange, but the meaning is the same. So, when you're forming a sentence, you usually move the question word to the beginning. This yields:
Who do you want to go with (t)?
And we can contract "want to" to "wanna", so now we have
Who do you wanna go with (t)?
The (t) is the trace - an unspoken, unwritten part of the sentence, marking the old position of a word that's been shifted. But how do we know it's actually there? Here's proof. We take the second question:
You want who to go with you?
Again, same meaning, different form. Move the "who" to the front, and you get:
Who do you want (t) to go with you?
See, now the trace is between the "want" and the "to" - this is why it sounds wrong to contract "want to" to "wanna" here! The trace is in the way.