Writer's Block sucks, sometimes writers get it while they are not writing, some writers get it while they are writing, some get it while they have a ton of ideas to type, and sometimes it just happens when we are just about to type.
Go back and to the drawing board: If you have writer's block while you are pumped full of ideas or you were about to type something epic, most likely this is because there is something you wrote previously that you did not like. Going back to read over your work will help you refresh your mind.
Write about anything: Even if you have to write about writers block write it down! Even if it has nothing to do with the story/novel/poem you are writing it does not matter. Write about something unrelated or keep writting what you are working on.
Go out and go walking or do something completely unrelated to writting: Go walk your dog, clean your house, take a walk, call a friend. Anything you can do to keep those brain cells going!
Write down ideas that pop in your head no matter how crazy it is!: If you think of an idea write it down, it does not have to be on paper, it can be on a computer. It does not have to be a full sentence it can be two words.
Bonus Round! What does not work:
1. Feeling sorry for yourself
2. Sitting and waiting for your muse to pop up.
3. Stop writing because you think not writting anymore will change your attitude somehow.