The electron-cyclotron maser is a process that generates coherent radiation from plasma. In the last two decades, it has gained increasing attention as a dominant mechanism of producing high-power radiation in natural hightemperature magnetized plasmas. Originally proposed as a somewhat exotic idea and subsequently applied to include non-relativistic plasmas, the electroncyclotron maser was considered as an alternative to turbulent though coherent wave-wave interaction which results in radio emission. However, when it was recognized that weak relativistic corrections had to be taken into account in the radiation process, the importance of the electron-cyclotron maser rose to the recognition it deserves. Here we review the theory and application of the electron-cyclotron maser to the directly accessible plasmas in our immediate terrestrial and planetary environments. In situ access to the radiating plasmas has turned out to be crucial in identifying the conditions under which the electron-cyclotron maser mechanism is working. Under extreme astrophysical conditions, radiation from plasmas may provide a major energy loss; however, for generating the powerful radiation in which the electron-cyclotron maser mechanism is capable, the plasma must be in a state where release of susceptible amounts of energy in the form of radiation is favorable. Such conditions are realized when the plasma is unable to digest the available free energy that is imposed from outside and stored in its particle distribution. The lack of dissipative processes is a common property of collisionless plasmas. When, in addition, the plasma density becomes so low that the amount of free energy per particle is large, direct emission becomes favorable. This can be expressed as negative absorption of the plasma which, like in conventional masers, leads to coherent emission even though no quantum correlations are involved. The physical basis of this formal analogy between a quantum maser and the electron-cyclotron maser is that in the electron-cyclotron maser the free-space radiation modes can be amplified directly. Several models have been proposed for such a process. The most famous one is the so-called loss-cone maser. However, as argued in this review, the loss-cone maser is rather inefficient. Available in situ measurements indicate that the loss-cone maser plays only a minor role. Instead, the main source for any strong electron-cyclotron maser is found in the presence of a magnetic-field-aligned electric potential drop which has several effects: (1) it dilutes the local plasma to such an extent that the plasma enters the regime in which the electron-cyclotron maser becomes effective; (2) it generates energetic relativistic electron beams and field-aligned currents; (3) it deforms, together with the magnetic mirror force, the electron distribution function, thereby mimicking a high energy level sufficiently far above the Maxwellian ground state of an equilibrium plasma; (4) it favors emission in the freespace RX mode in a direction roughl...