When a deity creates a world, Miasma is the 'residue' that is left over from creation. It exists between this plane of existence and another, and naturally occurs in the surrounding air in small quantities, but is invisible in its natural state. The thoughts of people can shape Miasma into the form of monsters, which cannot think and feel due to being derived from the substance. It works in a way not entirely dissimilar to the Dreamrealm, in that figments appear based on the thoughts and feelings of minds, but it's more closely tied to the material world, so the figments appear as real physical entities. Miasma is comparable to DNA, although with the involvement of magic; it assembles itself into certain patterns to form monsters. Monster 'species' recur from patterns; it was like the Miasma had a sort of 'memory'. When a monster dies, it dissolves into raw Miasma, which will then join the rest of the Miasma between planes.
It is possible to write a monster pattern from scratch instead of acquiring one from nature. Synthetic monsters are incredibly complex and require a lot of expertise to create, however. It's sort of the equivalent of authoring a genome.
Miasma is also present in Alora Fane, however its origins are unknown.
Essentially monsters are caused by strong feelings agitating the omnipresent miasma; if someone fears wolves a lot, then a snarling wolf monster might appear from thin air before them, for example. 'Species' form when thoughts occur a lot and form natural vortices or 'patterns' that the miasma more easily manifests as. Different feelings affect the miasma in different 'elemental' ways.
Magic, then, rather than simply being 'magic because it's magic', without explanation, is similar; mages essentially amplify their own emotions to the degree that the miasma takes on their form; they might feel a deep surge of sorrow, for example, which might make the miasma form into a brief eruption of pure 'sorrow' energy. Emotionally sensitive people make the best spellcasters in this world, because their emotions are stronger and more easily triggered.