The magnetic field is a key feature that distinguishes magnetron sputtering from simple diode sputtering. It effectively increases the residence time of electrons close to the cathode surface and by that increases the energy efficiency of the discharge. This becomes apparent in high power impulse magnetron sputtering (HiPIMS) discharges, as small changes in the magnetic field can result in large variations in the discharge characteristics, notably the peak discharge current and/or the discharge voltage during a pulse. Here, we analyze the influence of the magnetic field on the electron density and temperature, how the discharge voltage is split between the cathode sheath and the ionization region, and the electron heating mechanism in a HiPIMS discharge. We relate the results to the energy efficiency of the discharge and discuss them in terms of the probability of target species ionization. The energy efficiency of the discharge is related to the fraction of pulse power absorbed by the electrons. Ohmic heating of electrons in the ionization regionleads to higher energy efficiency than electron energization in the sheath. We find that the electron density and ionization probability of the sputtered species depend largely on the discharge current. The results suggest ways to adjust electron density and electron temperature using the discharge current and the magnetic field, respectively, and how they influence the ionization probability.