Controlled thermonuclear fusion is the main goal of plasma physics. At the Swiss Plasma Center, the Tokamak \`a Configuration Variable (TCV) constitutes the main experiment on fusion research, where high temperature plasmas are confined by means of magnetic fields. The confinement of plasma energy and particles is limited by transport arising from the gradients between the hot-dense plasma core and the cold-rarefied plasma edge. Due to the tokamak topology, plasma can rotate in the toroidal and poloidal directions. Plasma rotation has a strong influence on confinement and stability, which makes its understanding a priority. There are many discrepancies between the theoretical rotation description and experiments, which stimulated research in the field. In this context this work provided experimental results of unprecedented accuracy, where plasma impurity parameters are measured with the charge exchange recombination spectroscopy (CXRS) diagnostic. CXRS exploits the CX signal induced by a diagnostic neutral beam injector (DNBI), permitting localised measurements of impurity rotation, density and temperature. During this work, the CXRS diagnostic was extended with the development of a new high resolution system, termed CXRS-EDGE, devoted to the study of edge profiles. The accuracy improvements with respect to the legacy systems were obtained through an high throughput lens spectrometer and numerical aperture matching optics, resulting in rotation uncertainties <1 km/s. The upgraded CXRS diagnostic was used in the study of the impact of the sawtooth (ST) magneto-hydrodynamic (MHD) instability on rotation in L-mode limited plasmas and on the changes in edge impurity parameters at the onset of the H-mode in diverted discharges. The evolution of impurity profiles during a canonical ST were studied with a 2 ms time resolution. Rotation profiles suddenly change at the ST crash, passing from peaking counter-current to hollow co-current in the core, showing evidence of a co-current torque at the crash of increasing magnitude with the ST period. This explains the Ip scaling observed in TCV L-mode plasmas. This effect must be included in realistic theoretical models and might be exploited in tailoring rotation using ST period and radius as actuators. The crash is also characterised by expulsion of impurity from the core, resulting in hollow post-crash profiles, that can be exploited in a reactor scenario for avoiding impurity accumulation and for ash removal. The first accurate measurement of the changes in impurity flow across the transition to ELM-free H-mode were performed in this work. A narrow and deep poloidal rotation well develops at the last closed flux surface (LCFS) at the transition, together with a density pedestal and an increase of the temperature. From the kinetic profiles the radial electric field was computed, revealing the development of the well characteristic of H-mode as observed in other devices. The evolution of its components suggests involvement of the poloidal rotation in the triggering of the transition. A reasonable agreement was found from the comparison of the impurity rotation with neoclassical predictions. The observations reported in this work constitute a strong constrain for theoretical models, demonstrate the strong influence that fast MHD events have on transport and set more stringent conditions for edge impurity behaviours.