Studies of solar magnetic fields