Here are some examples:
* "He got himself up a tree with that lie, and now he doesn't know how to get out of it." (This means he's in trouble because of the lie he told)
* "After making that rude comment, she was really up a tree with her boss." (This means she made a situation worse for herself with her boss)
The idiom is thought to originate from the idea of a person being stranded in a tree, unable to get down and facing danger or an unpleasant situation.