Artillery works by the same principle as firearms. There is research underway towards the development of magic-firing cannons, but it would be much simpler, and quicker to just cast the fire magic oneself. Artillery and catapults can have quite a bit of output if they’re used by people with high levels, so they’re often brought forth in war.