Mana is a resource that you can gather from the mana well building outside your castle, as a prize for using tickets at the wheel, as a reward for completing quests or as loot from attacking orc camps.

Mana has two main uses -

It is required for healing troops in the hospital when they are wounded after a battle. The amount of mana used per troop depends on the troop type and can be seen when adding the troops for healing.

It is used in the mana well to produce "enchanted" or "magic" versions of certain production materials such as logs, boulders, flour and ore. You will need to upgrade the mana well using the blueprints for it in order to get access to some of the enchantments.

It's worth noting that the mana well will have more available to collect on a regular basis with a cool down timer between collection times.