A contextual indicator may be verbal—something in the sentence conflicts with the literal meaning—or situational—a setting, addressee, or visible referent that establishes the intended sense.
Verbal example: “The lion presented arguments”; presenting arguments suggests a human speaker.
Situational example: pointing at a brave soldier and saying, “This is a lion.”
Several cues may work together. Their strength determines how securely the nonliteral meaning is recognized.