Note that
take a walk!
can be an idiom. It essantially means "go away" and is the same as "give me a break" or "get lost."
Confusingly, of course the words "take a walk" can simpy mean you are taking a walk, and have no connection to the slang phrase.
I think the origin of the idiom is something to do with the legal/prison system; you can easily look it up.
Note that Joseph has made the outstanding point that "take a hike" is another version of the idiom, and it's more popular in AmE.