Sometimes the muse strikes, and it's wonderful. Sometimes you're just in the zone, and it's like the spirits of creation are controlling your fingers, weaving the words for you.
But that doesn't always happen. It can't, or you'd go insane and burn up. Part of being a professional writer is writing even without muse. It's waking up every morning, sitting down, and getting to work. And it's like any other work--like writing code, like laying down asphalt, like driving a truck. You do the work because you're a professional, even when you're not in the mood, even when you're preoccupied with daily worries unrelated to writing. Most successful writers aren't free spirits, wrapped in grace, transcribing the words of the heavens. Most are just hardworking professionals who show up and put down one word at a time, day by day.
If you're stuck and have writer's block, that's because you're waiting for the muse to knock. If it knocks, great. I love when that happens; it's one of the best feelings in the world. But if it doesn't, too bad--write anyway. Don't be afraid to write badly. Just put down words, even if you feel things aren't working. It's harder this way, yes, but so what? Odds are, once those words are revised and polished, you'll find some good material in there, often just as good as those pages written while "inspired."