Along these lines, magic has a rather noticeable if underappreciated effect on your implied setting. Beyond the obvious, which is that magic exists and so any number and type of amazing things can be dropped into a setting, many specific spells greatly shake up the world if taken at their word: Continual Light being perhaps the most obvious, but Animate Dead, Raise Dead, and Permanency being of especial note.
What I think is less considered here is the nature of magic itself. The default magic system for D&D is Vancian casting. I'm quite fond of it, and have no interest in the thousands of failed alternatives that have been proposed over the decades because it's "not realistic" or what have you. However, Vancian casting as seen in D&D is a system with a decidedly academic basis. That is, it all works off of spellbooks, which in turn requires literacy and the production of books and scrolls, and additional implied research and training. As a system it's all very, well, systemic.
There's nothing wrong with that either, but strictly speaking in terms of implied settings, it does close off a lot of worldbuilding avenues unless one wants to lean heavily on clerical magic. What if you want to have innate magic-users? How do you handle arcane magic in non-literate societies? What did arcane magic look like before the institutional framework was created that made the literate style possible? And, most importantly, how do I sell my soul to the forces of evil in pursuit of quick and easy power?
The base concept is not new, of course. Sword & sorcery fiction is full of this sort of thing (and DCC has built its magic system around things going terribly wrong as you wield its power). D&D nods in this direction with the DMG's witch doctors, but on the whole it's lacking, and one of my goals is an attempt to expand on elements like this that traditional D&D tends to be weaker at. Dissatisfied with the idea of sacrificing a virgin and summoning Baphomet in pursuit of terrible sorcery, only to told in a cavernous voice echoing with a thousand thousand screams, "there will be a test on Monday", and then handed a pile of books and ink quills, I decided to construct some alternate systems, not to replace Vancian casting, but to complement it.
Of course, you could always just take a conventional magic-user, add an evil alignment, a two-line backstory, and a roll
or five on a random corruption/mutation table (I'm fond of the ones in The Metamorphica: Revised). This is intended for those who want a more systemic approach to the subject, with results that can be gained through actual play. I've looked to the influences given above, as well as the general sense of
the Dark Side system in the old West End Games Star Wars RPG.
My GM's Manual has the write-up on this for my own system (it's there because I don't really expect it to be a typical player option, though it's possible), but here's a full D&D equivalent. Non-evil versions I'll tackle another time.