The adverb is "immediately". An adverb is a type of word that adds information to the verb in the sentence. The verb is the word that provides the action. So, in this sentence both "told" and "leave" are verbs, because those are actions, things that you DO. "Immediately" is describing the word "leave" and indicating HOW you need to leave.