What's the difference between there, their, and they're? Please give an example.

'there' is an adverb: 'you can't stay there' (the opposite of here)
'their' is a possessive adjective: 'he is their hero' (that means that he is the hero of them)
'they're' is the contracted form for 'they are' (subject + verb to be)

Grammatically is, Go away, Tom. a reply to a question or an instruction?