Each and every spell in Kingdom Hearts 3 uses the resource MP (Mana Points), so if you want to heal yourself with Cure, deal some fire damage with Fire, or want to buff your party, you will need to spend MP to accomplish this. If you spend it all, you won't even be able to cast any more spells, but luckily it is possible to restore your MP. There are three methods on how to restore your MP in Kingdom Hearts:
The first method is to use an MP restoring item. These are called Ethers, and will restore a certain amount of MP per Ether used. You can also use an item called the Elixir, which will fully restore your MP, as well as all your health. So the latter one is a good choice if you are about to die, and have little MP left to restore your health.
These items can obviously be used in combat, but you can also use them outside of combat to make sure that you have some extra MP going in to battle. The items can be used from the item menu, or they can be assigned to a button if you want to use them quickly.
A second method for regenerating your MP is to defeat enemies. Each time you kill a bad guy, they will drop both green and blue orbs that you can pick up. The green ones will regenerate your health, while the blue one will restore some MP. So if you are able to kill a few enemies without having to spend MP, chances are that you will be able to restore a fair amount of it.
A third way to restore your MP is to just wait 30 seconds when it's empty. When you have waited 30 seconds after using a spell, your MP gauge will turn pink, and naturally regenerate over time. However, if you use a spell, it will turn blue again, and you will need to wait another 30 seconds before it begins to regenerate naturally.