When doing the main scenario, or FATEs etc, I always had trouble keeping mana up as well! Especially long FATEs - I'd generally run out of mana before long. Tbh with those I recommend just not worrying too much as you will get gold at the end regardless if you've been doing a fair bit of damage. As Moqi said, if it's trouble in class quests, keeping the NPCs alive is very helpful. Otherwise, sadly there isn't really any fix to it except for pots.

If it's dungeons/trials/guildhests you mean, as a White Mage your first priority is healing. We don't really have a set rotation. Cure I until you get a free Cure II will help conserve MP. At this point, there isn't a lot of use for Medica unless everyone is taking damage, which I don't think happens in early stuff. Sometimes the DPS might take a bit of damage and then stop, and it's ok not to heal them as their health will regenerate any way. If you're sure you will have enough MP to heal and DPS then great, but if not it's better to save it for healing. If it's your first time doing the dungeon it might be better to just focusing on healing as you don't know what's coming up next, and after lv.30 the dungeons are a step up from earlier ones.
On the off chance you find you're going through your MP healing someone, check their gear as it might be broken or low leveled and tell 'em to fix it please.

Over time everyone learns to manage MP appropriately and not over heal etc, and Shroud of Saints and Regen are a big help, but it's just experience that teaches that!