There's a few things that help to make magic... feel magical.
If you treat magic like a commodity, it will feel like a commodity. If you treat magic like a strange rarity, perhaps even a scary break from reality... it will be treated like that, too.
While the players or the magic type characters may know the basic limitations of magic ("You can only cast X number of spells a day", "You have to make an endurance check or you might pass out"), the average, uninformed person sees someone do an act of magic and has no idea what could happen next - "How do I know they can't just KEEP doing that? How do I know they can't do EVEN MORE worse things? How do I know they're not reading my mind, right now?!?"
Give magic descriptions that leaves the players wondering if it's... doing more than what it appears to be doing.
"Yes, the light emanates from the object, just as you had intended, giving you some thing to see by in the darkness... but the light makes the back of your eyes hurt, just a bit. Probably best to get into some normal light as soon as you can, yeah?"
"You flip over the divination cards, one by one. Somehow time seems to stretch out a bit, and you swear you've flipped over the last card 3 times, and you are forced to do it again. That's probably just your imagination. You hope."
"The words you read feel... wrong somehow. You hear what you swear is the cries of a child. No, hundreds of children but then it morphs into the cry of a hawk as the bird swoops down to your outstretched arm. The summon has worked... but you try not to think about where or what this thing you pretend is a bird, actually came from."
The last thing which adds weight to the idea of magic is the idea that magic has costs or consequences far beyond what you intend. The idea that you're playing with fire, and things might just go wrong.
It's not like magic has to be unreliable, it just has to be that if things do go wrong, they tend to go wrong in wide reaching ways. Think of all the folk tales or legends about curses and how they end up just spreading and spreading. Or the wish-granting item/being but the wishes turn out to give you what you want at the cost of something you never wanted to happen...
Imagine if those kinds of things might happen ANY time you play with magic...You'd probably not be so casual with magic, right?
And the costs of magic shouldn't be easily reversible, either. It's one thing if a spell costs you a few hitpoints and you heal up in hours or days for the cost of the effect. It's another thing if one of your fingers looks permanently scarred with burn marks from the spell you cast, and if you keep doing it it will eventually be your whole arm, then your whole body...
Games that do stuff like this
Burning Wheel has a nice randomized spell error mechanic where a relatively mild spell might have cataclysmic effects if you roll lucky/unlucky enough.
Sorcerer requires you to command a demon anytime you want magic to work... on the other hand, the demons are pumping you to fulfill their magical needs too, and sometimes they get ideas of their own...
Unknown Armies makes magic rare and difficult. You have to work to build up charges and spending them is not a light thing either.