I'd love to say that just writing works for me, but generally, it's walking away for a while that helps. Granted, you really need to be commited to writing to be able to pick it back up.
I seperate a writer's block into two kinds, the 'where the hell do I go now,' and the 'how do words work what do I put on the page.' Both I solve by not writing, but the first is really just thinking about the situation, and not being afraid of removing words. The second one, for me personally, tends to be burn out. I'll be able to pick it back up at a later time, mostly.
I think writing, or creating in general, is a very personal process, in that most people tend to go about in their own way. For you, walking away might be the best option like it is for me, but for others it really might be to push through and keep writing.