For those of us who like to roleplay wizards or other magic users, we find ourselves with a small list of spells that the author or creator of the universe has provided for us to use. Often times, your character can be faced with a situation where they need a spell that doesn't exist yet in their universe - and that's okay! The beautiful thing about RP is that we get to expand our favorite fandom universes to allow for our own ideas. For this guide, I'll be dealing mostly with the Potterverse, but this can apply to other fantasy fandoms with magic users as well.
Step 1: What kind of spell do you need?
You first need to determine the type of spell you're looking for. Is it a spell your character will be using for a routine task? Are they in a duel? Trying to show off for their friends? In any case, you need to make sure the spell you're looking for exists or not. For example: in the Potterverse, you might need to use a Freezing Charm - that certainly exists, but there is no incantation for it. And in other cases, the spell and incantation you need might not exist at all.
Step 2: What is the incantation?
For figuring out the actual "magic words" you can do pretty much anything - I personally like to stick to the same kind of etymology as the majority of spells in the established canon. Let's stick with our Freezing Charm example - most Potterverse spells are in Latin, so we'll stick with Latin. Thanks to Google Translate, we don't have to be fluent in the language to make the incantation.
We'll go to Google Translate and start playing around with Latin words. Because we're looking for something to use for a Freezing Charm, you might enter the words "to freeze," "cold," or even "to stick" - use your imagination! I decided to go with "ice," because in Latin, Google Translate gives me "Glacio" as a verb.
For spells and charms that don't exist at all, you just do the same thing: figure out what you're wanting your spell to do, hit up Google Translate, and pick something you like.
And there you go! There's your spell. You can use this for other things as well - fictional diseases, books in other languages, etc.
I hope you go out and create a whole new world of spells!