In the process of designing the grounding system of an electrical power facility, it is necessary to calculate as accurately as possible the expected values of the danger voltage and the amounts of the electric and magnetic fields to which personnel and living beings in the immediate vicinity of the facilities under consideration will be exposed, both in a stationary state and in cases of short circuits and transient states of the system caused by lightning strikes. In order to make this possible, it is necessary to develop appropriate computer programs that will be able to model the above phenomena, with as few omissions as possible and as accurately and quickly as possible. In the dissertation, a new harmonic electromagnetic model of the conductor system in a horizontally arranged multilayer medium has been developed. The developed electromagnetic model takes into account the complete electromagnetic coupling between the conductors that can be located anywhere in the multilayer soil and even in the air. The conductors can be in any position relative to the soil surface. In addition, the conductors can be bare or insulated relative to the surrounding soil. This model includes, in addition to the calculation of the current distribution across the conductor system, the calculation of the potential at any point of the multilayer medium and the calculations of the hazard voltage. In addition, the model also includes the calculation of the distribution of the electric and magnetic field strength at any point of the multilayer medium for any frequency of interest. By upgrading the harmonic electromagnetic model, a new transient electromagnetic model of the conductor system in a horizontally stacked multilayer medium has been developed. The transition from the frequency domain to the time domain was performed using the FFT – IFFT algorithm. By applying the electromagnetic models developed here, it is possible to carry out new analyses and calculations that were not possible before. It is also possible to analyze the influence of soil layer parameters on the harmonic and transient behavior of the grounding system more accurately and qualitatively using simple examples. In addition, the grounding system in question may include metal structures in the air, which means that direct lightning strikes to GSM base stations, overhead power lines or parts of high-voltage switchgear can be simulated. The main original scientific contribution of the dissertation is the development of an efficient harmonic and transient electromagnetic model of a conductor system in a horizontally stacked multilayer medium. The scientific contribution of this work can be viewed much more broadly since, due to the universality of numerical methods, all developed numerical procedures can be successfully applied in the research and solution of a number of problems in various branches of technology.