Magnetic fields in non-convective regions of stars