Magnetic fields play a crucial role in heating the outer atmospheres o
f the Sun and Sun-like stars, but the mechanisms by which magnetic ene
rgy in the photosphere is converted to thermal energy in the corona re
main unclear. Observations show that magnetic fields emerge onto the s
olar surface as bipolar regions with a broad range of length scales. O
n large scales, the bipolar regions survive for months before dispersi
ng: diffusively(1-3). On the smaller scales, individual bipolar region
s disappear within days but are continuously replenished by new small
flux concentrations, resulting in a sustained state of mixed polarity(
4). Here we determine the rate of emergence of these small bipolar reg
ions and we argue that the frequent magnetic reconnections associated
with these regions (an unavoidable consequence of continued flux repla
cement) will heat the solar atmosphere. The model that describes the d
etails of these mixed-polarity regions(4) is complementary to the trad
itional diffusion model for large-scale flux dispersal(1-3), and a com
bination of the two should lead to a more complete understanding of th
e role of magnetic fields in stellar atmospheres.