This is going to be one of those things that will be very individual.
For me, writing through it never works. It results in crap. What I do is to write something else, instead. My first preference is to write a scene that is coming up in the story, which I can then drop in when the time comes. If this isn't possible (such as when I hit a block just before the end of the story), I'll write a short story, or start another story, or maybe a scene from another story.
The idea is to keep writing, even if it isn't on the current story.
When I've written a scene that will appear later in the story, I sometimes find that if I work backwards from that scene, the writers block disappears. This is the case when it is the link between the current situation and where I want to get to that causes the block. By moving past the blocked area and then approaching it from the other side, the block is gone. This has worked several times for me, but it is a solution that is also specific to the situation I found myself in. If the writers block is because just nothing is coming out, then writing something else is the way to go.
At least for me