Magnetic Fields in the Solar Atmosphere