The short answer is, it depends. The long answer is, try reading through the wiki page. The medium answer, then, is perhaps the most interesting…
The radius of an explosion is dependent on three main factors: the "power" of the explosion, the explosion "resistance" of the materials being destroyed, and a random factor.
Explosion power is 4 (approximately four blocks) for TNT, 3 for uncharged creepers, 6 for charged creepers, just 1 for ghast fireballs, and 5 for nether beds. Block resistance varies wildly, from 0 for air and weak blocks like redstone wiring, to 30 for most types of stone, to 18,000,000 for bedrock!
When an explosion occurs, it sends out a large number of invisible "rays", each with 70%-130% of the explosion's power. When a ray strikes a block, it's power is applied to the block's resistance. If the power is higher, the block is destroyed and the weakened ray travels on. If the resistance is higher, the ray is stopped, but the block is weakened against other rays.
The upshot of this is that explosions travel to a maximum of 1.3 times their power in blocks, through air. So airburst TNT will reach about 5.2 blocks from its center. Through solid stone, however, TNT will only carve out a single block on all sides (a radius more than one, but less than two).
Alternatively, you can stop casting the spell at a higher caster ability. Press the C button to lower the mana cost (and also the effectiveness, but it's worth it).
Best Answer
It happens when you make too complex a spell. In your Arcane Compendium, it should say effects it adds with different blocks, if your crafting altar can only support 3 or 2 effects and you make one with 4, the book will turn red, indicating your altar isn't sufficient. If you attempt to make it anyway, your altar explodes. If you see your book turn red on the altar, remove the book, upgrade the altar, and try again