Ah, the dreaded writer's block. To be honest it depends how bad it is. Sometimes you can play your way through the pain by just writing something/anything every single day until one day inspiration strikes. I know that's what a lot of established writers recommend. Other times I will just temporarily admit defeat and recognise that my brain and imagination needs a bit of down time. I'll then give writing a swerve for a couple of weeks and do something different, like cycle, take my dog for longer walks or perhaps just catch up on my reading. Everything passes and sooner or later the muse returns.