To write anything you need to know the basics of a story such as characters, dialogue, plot and conflict. You may not be skilled in all of these areas, but we'll assume you can grasp them well enough to formulate a story. When taking those elements and fashioning them into a fantasy, many new elements will be included, unique touches which take your tale away from other genres and place it into the realm of fantasy. One such element that does this is magic (not actual magic, but the presence of magic in your story).
Magic is key, it is the heart which beats inside most fantasy novels. If there wasn't magic present, most plot points wouldn't exist, a lot of characters wouldn't be created, the story wouldn't be the story if you took away the element of magic. If the wardrobe wasn't enchanted, the children would never have made it to Narnia and therefore, there would have been no tale of the Lion and the Witch.
Now, as you are creating your magical world, you must be controlled. A story where anything is possible is not a very interesting story. Your characters must still be flawed and your conflicts must still be challenging - even seemingly impossible to overcome.
I remember being a child and playing make believe with kids at school. Often we ran into a situation where we would try to one up one another with our superhero/supervillain abilities until it came to a point where we had unlimited powers. Our battle was a draw and no one wanted to play anymore. This will happen to readers if your magic is limitless, they won't want to read your story anymore.
So when writing fantasy: make your magic unique, but keep it controlled.