The raw form of magic is known as primal magic (also known as wild magic). It lies beyond the borders of reality, but can be drawn upon by spellcasters. It is a chaotic force, and can be found in the Great Beyond in areas attuned to chaos, such as the Maelstrom and the Abyss.
In Golarion, primal magic is only able to manifest in areas where the laws of reality have been weakened, most commonly in the devastated area between Nex and Geb known as the Mana Wastes. It might also occur in areas which have suffered the wrath of the gods, or when a powerful artifact is destroyed.
A manifestation normally follows an accumulation of primal energy, which then explodes into existence in the Material Plane. The effects are unpredictable, and range from the weird (a burst strange music, or a rain of rotten fruit) to the dangerous (a firestorm sweeps through the area, or all creatures present are lashed by negative energy).