Magical Research (PHB)

One oft-ignored asset of both wizards and priests is magical research. While the spell lists for both groups offer a wide variety of tools and effects, the clever player character can quickly get an edge by researching his own spells. Where other spellcasters may fall quickly into tired and predictable patterns ("Look, it's a wizard! Get ready for the fireball, guys!"), an enterprising character can deliver sudden (and nasty) surprises!
Although your DM has the rules for handling spell research, there are some things you should know about how to proceed. First and foremost, research means that you and your DM will be working together to expand the game. This is not a job he does for you! Without your input, nothing happens. Second, whatever your character researches, it cannot be more powerful than the spells he is already able to cast. If it is, you must wait until your character can cast spells of an equal power. (Thus, as a 1st-level wizard, you cannot research a spell that is as powerful as a fireball. You must wait until your character can cast a fireball.) Finally, you will have to be patient and willing to have your character spend some money. He won't create the spell immediately, as research takes time. It also takes money, so you can expect your DM to use this opportunity to relieve your character of some of that excess cash. But, after all, how better for a spellcaster to spend his money?
Knowing these things, you should first write up a description of the spell you want to create. Be sure to include information on components, saving throws, range, duration, and all the other entries you find in the normal spell listings. When you give your DM the written description, tell him what you want the spell to do. (Sometimes what you write isn't really what you mean, and talking to your DM is a good way to prevent confusion.) After this, he will either accept or reject your spell. This is his choice and not all DMs will have the same answer. Don't kick and complain; find out what changes are needed to make the spell acceptable. You can probably iron out the differences.
Once all these things are done, your character can research the spell. Be ready for this to take some time. Eventually he will succeed, although the spell may not do quite what he expected. Your DM may revise the spell, perhaps reducing the area of effect or damage inflicted. Finally, all you have to do is name your spell. This should be something suitably pompous, such as "Delsenora's Malevolent Steamroller." After all, you want something to impress the locals!