People who don’t write think that writing is magic. But if you ask a writer, they’ll tell you straight-up that hell no, it’s not magic. It’s skill and experience and practice and a whole hell of a lot of plain old work. They can tell you about grammar and techniques of world-building and character and plot, how to manipulate words to create an effect, and the extremely un-magical feeling of being two-thirds of the way through writing a story and deciding that EVERYTHING SUCKS THAT THEY EVER WROTE EVER and in particular this specific story. XD
But you know what? The non-writers are right.
Sure, there’s craft that goes into getting the effects you want. You can explain to somebody how you went about making it happen. But the idea for it? That’s alchemy. The fact that you have manifested characters and a story and a world that don’t tangibly exist, that surely never existed before, but that you can nevertheless share? Invite other people to step in and wander around? Tell me that’s anything short of magic. It’s a magic that can be taught and learned, but no science or skill ever taught can create something that never existed before.