Abstract The observed properties of solar magnetic fields are reviewed, with particular reference to the complexities imposed on the field by motions of the highly conducting gas. Turbulent interactions between gas and field lead to heating or cooling of the gas according as the field energy density is less or greater than the maximum kinetic energy density in the convection zone. The field strength above which cooling sets in is 700 G. A weak solar dipole field may be primeval, but dynamo action is also important in generating new flux. The dynamo is probably not confined to the convection zone, but extends throughout most of the volume of the sun. Planetary tides appear to play a role in driving the dynamo.