We hear this all the time, and the answer from most writers is “sit down and write”. And that’s a valid answer, because in order to write you simply have to pick up a pen, or type on a keyboard, and write.
But I think the question most people mean to ask is really “how do I keep writing, even when I don’t want to?”
That’s a little more complicated. Learning to write is, in many ways, as hard as learning to play an instrument or becoming a pro-ball player. It’s less physical (unless you count carpel tunnel from all this typing) but it takes practice and dedication.
The other question might be: “How do I stay inspired?”
There is a terrible myth that all great art is created by this magical muse that comes and gives you incite at the right moment. Then you write a LOT, and everything is wonderful. It’s bullshit, but that’s the rumor.
The truth, and a truth all failed artists of any medium fail to see, is that the really great artists (Michelangelo, Da Vinci, Picasso, Van Gogh) had a few hundred paintings and sculptures in museums. Thousands more of their paintings were destroyed before they ever left the studio because they simply weren’t good enough. There are whole sketchbooks from some of the greats of pictures that were started, restarted, scratched out, and restarted again.
Ray Bradbury wrote a short story every day for YEARS. Not all of them were great, but he had a lot of practice, and a lot of them were. Picasso painted several paintings each day, and only a handful survived.
You need to write, and you need to write A LOT in order to get better. Thinking you can get out of that disregards all of the years that every other artist has ever put into writing.
As for the muse… create your own muse. Find out what inspires you to write, and keep doing that. For me it’s reading good books, talking to other authors about writing, or listening to a podcast. I know that if I do these things a lot then I will probably produce a lot more words on the page, just because I want to keep going. I want to see my book finished and in print.
For you it might be long walks, a shower, or a contemplative morning in front of a tech magazine.
Find what works for you, and keep doing that. Make your own muse. And even if the muse doesn’t come, sit down and write about the muse. Ask her/him why he isn’t showing up, and keep going.