Tokamaks and stellarators are the most promising reactor concepts using the magnetic confinement to contain the plasma fuel. Reactors capable of sustaining deuterium-tritium (D-T) fusion reactions requires the confinement of a very high temperature plasma (above 100 millions kelvin). In addition to external heating methods, the slowing down of alpha particles (helium-4 nuclei) born from D-T fusion reactions on the background plasma represents a significant source of plasma heating. The good confinement of fast particles is therefore one of the most important aspect of magnetic fusion devices. Furthermore, long plasma operation in future fusion reactors requires the control of inherent plasma instabilities. These instabilities are particularly dangerous in tokamaks because of the large plasma current necessary to establish the confining magnetic field. In this thesis we use the numerical code package SCENIC to study the application of Ion Cyclotron Range of Frequency (ICRF) waves to tokamak and stellarator devices. This numerical tool was built to self-consistently solve, in three dimensional configurations, the plasma magnetohydrodynamic (MHD) equilibrium, the ICRF wave propagation and the resonant ion distribution function. SCENIC is used to interpret how the sawtooth instability can be controlled in tokamaks by appropriate application of ICRF waves. This control method was successfully tested in the JET tokamak and it is foreseen to be applied in the future ITER tokamak. Such plasma degrading instabilities are not, however, expected in stellarators because they operate with no plasma current. The recently started stellarator Wendelstein 7-X (W7-X) must however prove experimentally that fast particles particles can be confined in an optimised quasi-isodynamic magnetic configuration. An efficient auxiliary source of fast ions is required in W7-X since it is not designed to procude alpha particles via D-T fusion reactions. In this thesis, we address the possibility of generating a significant fast ion population with ICRF waves in W7-X. SCENIC simulations are employed in order to identify relevant fast ion loss channels that may still exist in the W7-X quasi-omnigenous equilibrium. These simulations show that ICRF minority heating may not be suitable for producing fast ions in W7-X plasmas. It is found that a high energy tail is more likely to be developed if a three-ion species scheme is applied.