'Magic', as it was referred to, was non existant back in the first age
When the Gods tapped into the Djinn dimension for the first time, Djinn power filled their dimension for the first time. The inhabitants of Dünya had access to it too. Gradually, the people learnt how to harness this ability
Djinn magic is usually harnessed through powerful gems. Some special few devote their lives to absorbing the magic into their blood and so they can use it without the use of gems. But those who are able to become corrupted by the power. Their souls belong to their Djinn deities.