Magic levels are gained by using spells within each element. They are separated between offensive (Popoi) and defensive (Primm). Every element you gain starts at Level 0 and can be raised to a maximum of Level 8, with each level requiring more uses of the same spell.
Each progressive level is unlocked by attuning with a Mana Seed as you work through the game, with Level 7 to 8 being unlocked when you reach the Mana Tree.
The simplest method to raise your levels is to find a spot with enemies and cast the required spells over and over, exiting and reentering the screen to respawn enemies as needed. For most of the girl's magic, you can simply cast it on yourself repeatedly, staying at an inn to replenish MP. When the sprite unlocks the Luna elemental, he can use MP Absorb, which effectively grants him an endless source of replenish-able MP.
(Note: Magic can be raised above Level 8, to 8:99. At 8, and the closer to 8:99 you get, there is an increased chance that you will cast a 'super' version of the spell, featuring enhanced graphics and damage. It is not required to level above 8 for the trophy, however.)