It's often used to describe someone who is trying to avoid capture or prosecution.
For example:
* "The bank robber is on the lam after the heist."
* "She's been on the lam for weeks, trying to stay one step ahead of the police."
The phrase is derived from the word "lam," which originally meant "to run away" or "to beat it." It's a bit of an informal phrase, though it is widely understood.