Istiʿārah borrows a term from one referent for another through a recognizable respect of resemblance. A formal simile names both compared things, whereas metaphor transfers a term from one side to the other.
“He is like a lion in courage” explicitly compares; “He is the lion of the battlefield” borrows the animal-name for the brave person. The borrowing does not transfer every property of the animal—only the contextually intended quality, such as courage.
A sentence about a lion hunting prey could be literal; the human interpretation requires a cue.