The goal of thermonuclear fusion research is to provide power plants, that will be able to produce one gigawatt of electricity. Among the different ways to achieve fusion, the tokamak, based on magnetic confinement, is the most promising one. A gas is heated up to hundreds of millions of degrees and becomes a plasma, which is maintained – or confined – in a toroidal vessel by helical magnetic field lines. Then, deuterium and tritium are injected and fuse to create an α particle and an energetic neutron. In order to have a favorable power balance, the power produced by fusion reactions must exceed the power needed to heat the plasma and the power losses. This can be cast in a very simple expression which stipulates that the product of the density, the temperature and the energy confinement time must exceed some given value. Unfortunately, present-days tokamaks are not able to reach this condition, mostly due to plasma turbulence. The latter phenomenon enhances the heat losses and degrades the energy confinement time, which cannot be predicted by analytical theories such as the so-called neoclassical theory in which the heat losses are caused by Coulomb collisions. Therefore, numerical simulations are being developed to model plasma turbulence, mainly caused by the Ion and Electron Temperature-Gradient and the Trapped-Electron-Mode instabilities. The plasma is described by a distribution function which evolves according to the Vlasov equation. The electromagnetic fields created by the particles are self-consistently obtained through Maxwell's equations. The resulting Vlasov-Maxwell system is greatly simplified by using the gyrokinetic theory, which consists, through an appropriate ordering, of eliminating the fast gyromotion (compared to the typical frequency of instabilities). Nevertheless, it is still extremely difficult to solve this system numerically due to the large range of time and spatial scales to be resolved. In this thesis, the Vlasov-Maxwell system is solved in the electrostatic and collisionless limit with the Particle-In-Cell (PIC) ORB5 code in global tokamak geometry. This Monte-Carlo approach suffers from statistical noise which unavoidably degrades the quality of the simulation. Consequently, the first part of this work has been devoted to the optimization of the code with a view to reduce the numerical noise. The code has been rewritten in a new coordinate system which takes advantage of the anisotropy of turbulence, which is mostly aligned with the magnetic field lines. The overall result of the optimization is that for a given accuracy, the CPU time has been decreased by a factor two thousand, the total memory has been decreased by a factor ten and the numerical noise has been reduced by a factor two hundred. In addition, the scaling of the code with respect to plasma size is presently optimal, suggesting that ORB5 could compute heat transport for future fusion devices such as ITER. The second part of this thesis presents the validation of the code with numerical convergence tests, linear (including dispersion relations) and nonlinear benchmarks. Furthermore, the code has been applied to important issues in gyrokinetic theory. It is shown for the first time that a 5D global delta-f PIC code can achieve a thermodynamic steady state on the condition that some dissipation is present. This is a fundamental result as the main criticism against delta-f PIC codes is their inability to deal with long time simulations. Next, the role of the parallel nonlinearity is studied and it is demonstrated in this work that this term has no real influence on turbulence, provided the numerical noise is sufficiently low. This result should put an end to the controversy that recently occurred, in which gyrokinetic simulations using different numerical approaches yielded contradictory results. Finally, thanks to the optimization of the code, the gyrokinetic model has been extended to include the kinetic response of trapped-electrons, in place to the usual adiabatic (Boltzmann) approximation. For the first time, global TEM nonlinear simulations are presented, and the role of the zonal flow on heat transport is analyzed. This study will help in acquiring some knowledge on the less-known TEM turbulence (as compared to ITG). In conclusion, this thesis is one of the main steps of the development of ORB5, which is now a state-of-the-art gyrokinetic code for collisionless ITG and TEM turbulence, and has brought several contributions to the understanding of these phenomena.