The need of durable and abundant energy sources for future ages stimulates the studies of thermonuclear energy sources, based on hot plasma confinement by magnetic fields. The most developed concept of hot plasma trap is the tokamak, where the plasma confinement is obtained by a combination of external magnetic fields with the magnetic field of the current flowing in the plasma torus. The stability of the tokamak plasma is the main subject of the present work. The hot plasma is approximated by the model of the ideal magnetohydrodynamics (ideal MHD) as a superconductive liquid. Being relatively simple, this model describes basic plasma stability properties and establishes necessary stability conditions. The analytical ideal MHD theory is well developed, but some assumptions, required for analytical treatment may not be valid for the plasmas of modern tokamaks and for future tokamak-based reactors. To circumvent this numerical codes have been created. These codes are free from such limitations, but they are not as convenient in use as analytical formulae. In the present work the validity of the analytical approach for the conditions of tokamaks like TCV and MAST is examined in comparison with numerical code predictions by studying the dependence of the ideal MHD stability on plasma toroidicity and shape parameters. The experimental study of the plasma dependence on triangularity, carried out on the TCV tokamak, is consistent with the results of the numerical calculations. A new formula, describing the ideal MHD stability dependence on plasma toroidicity and shape parameters is proposed for use in modern tokamaks and future reactors. This formula could be used instead of analytical expansions, which are not valid in such conditions. The ideal MHD stability of highly elongated TCV plasmas has been studied using numerical codes and the optimum plasma shape, which allows higher plasma performance, was found. Experimental data on the high elongation plasmas in TCV are consistent with the numerical predictions. Advanced tokamak plasma configurations, which provide better plasma properties, are amongst the main goals of the TCV tokamak research activity. The ideal MHD stability analysis of such plasmas, using numerical codes, can be useful for optimization of plasma parameters, and designing new experiments with improved plasma performance. Reversed shear plasmas with internal transport barrier were analyzed and the influence of the plasma pressure and current profiles on the ideal MHD stability of these plasmas was examined in detail. By fine tuning of the electron cyclotron heating and current drive system of TCV it was found that it might be possible to improve the plasma performance in reversed shear plasmas, by creating the optimal current and pressure profiles.