  An overview is given about recent developments and results of comprehensive
simulations of magneto-convective processes in the near-surface layers and
photosphere of the Sun. Simulations now cover a wide range of phenomena, from
whole active regions, over individual sunspots and pores, magnetic flux
concentrations and vortices in intergranular lanes, down to the intricate
mixed-polarity structure of the magnetic field generated by small-scale dynamo
action. The simulations in concert with high-resolution observations have
provided breakthroughs in our understanding of the structure and dynamics of
the magnetic fields in the solar photosphere.
