Glowing Fish wrote about this topic but I would like to expand upon it, for I see in Tolkien's work not simply a treatment of magic as craft, but magic as danger.
In recalling my readings of the Middle Earth tales, I am struck by how little the author seems to like magic as a concept. In a similar vein to the Wizards of Discworld, Tolkien treats magic as a dangerous force better to be avoided than used. Unlike the Forgotten Realms and all its derivatives, unlike the high and low fantasy we have come to know, Tolkien's Middle Earth does not approve of magic.
Take, for example, the most well-known set of magical artifacts involved in the stories: The Rings of Power. How often do you see any one of them used at all? Of the three elven rings, none are used on camera -- the ring of water presumably makes the creek rise to sweep away the Nazgul, and MAYBE Galadriel uses the ring of air to overthrow Dol Guldur, but as far as I remember Gandalf never uses the Ring of Fire. The only ring we ever see in explicit use is the One Ring, and it's only in The Hobbit when Tolkien hadn't figured out what the ring was. As soon as the Lord of the Rings books come around and we see the One Ring for what it is, its functions are written to be evil.
Three rings of power that the elves were specifically entrusted not to use. One ring that the book keeps telling us over and over again not to use.
Seven rings for the dwarf-lords, who were able to resist the corrupting influence of their gifts.
Nine rings wielded by mortal kings, who were unable to resist, and became the chief servants of Sauron.
Take, for another example, the lesser-known magical artifacts of Middle Earth: The Silmarils. Not made by an evil figure nor filled with a corrupting influence. Right? WRONG! Everyone who gets involved with the silmarils comes to ruin besides Earendil. Elu Thingol asks for Beren to retrieve a Silmaril and he loses his daughter and then he gets killed by the Dwarves who want the jewel. Then the dwarves get killed by Beren. Feanor and his sons swear a binding oath to get the Silmarils back, Feanor gets himself killed in the process, the remaining sons fulfill their binding oath by attacking and destroying Doriath in pursuit of the Silmaril, which, by the way, could only have happened because Thingol's wife left Middle Earth in her grief, so really the whole mess is Elu Thingol's fault for setting up the stupid Fetch Quest in the first place.
Yet the silmarils are also Morgoth's undoing, because they weigh him down with their light for hundreds of years, and then one of them guides Earendil across the sea so he can seek help from the Valar.
Earendil winds up carrying the Silmaril in his ship through the heavens, far out of reach. The other is now stuck in a deep crevice of the earth, and the third is stuck in the ocean somewhere.
Consider the third, and least-known of the magical artifacts of Middle Earth: the Palantiri. The far-seeing stones, devised by Feanor to communicate with each other and let powerful people see far across the world. By the time we see them in The Return of The King, all but two are lost. Of the two remaining, both are revealed in the chambers of great leaders who fell from grace: Saruman and Denethor. Saruman cast his eyes wide over the world and was ensnared and deceived by Sauron. Denethor cast his gaze over the works of Sauron, and sunk into suicidal despair.
A set of magical video phones and Tolkien manages to make them a source of corruption too. Jesus Christ! And you think it stops there? The last act of the Hobbit has everyone fighting everyone for the Arkenstone.
It's almost as if Tolkien can't write about a magical artifact without turning it into something too dangerous for use. The only GOOD magic artifacts in the entire story are the Boats of Cirdan and the Great Horn of Boromir.
As if that wasn't enough, Tolkien limits the large-scale use of magic in Middle Earth to evil characters and evil beasts. Sauron acts as the greatest magician in Beleriand. Shelob is a giant spider. Balrogs are wrapped in shadow and flame. The leader of the Nazgul is called the Witch King. Saurman, the greatest wizard of the Third Age, is the antagonist of Book 2. Gollum, who used the One Ring longer than anyone else, was warped and twisted by it. Old man Willow tries to eat the hobbits. The Barrow -wights try to eat the hobbits. Meanwhile the Nine heroes of the fellowship almost never use magic, and Gandalf himself is a being whose bosses specifically limited his power level so he wouldn't become corrupt. Of the remaining eight, only Aragorn uses magic, it's specifically for healing, and he only does it at the end of the story.
And the most powerful woman in Middle Earth is Galadriel and you NEVER see her use her abilities directly. The one time she comes close is when Frodo offers her the ring and she almost takes it and the movies play that part up better than the book, because she almost goes nuts. She only passes the test by resisting.
Gollum failed his test, and was killed by his pursuit of magic.
As was Sauron, in the end.
In Middle Earth, magic is a force to be avoided. It corrupts the strong, devours the weak, and invites only sorrow. Everyone who gets involved suffers.
Go to Forgotten Realms if you want safe magic. Otherwise, the best you can hope for in Middle Earth is if you stumble into Tom Bombadil's house.