Magnetic turbulence in and around the Earth's magnetosphere