I didn't know the method, but checking on Wikipedia's article it seems that these methods involve two phases, that are repeated one after the other repeatedly:
Particle mover: compute the motion of particles based on the fields given in your mesh; and
Field solver: based on the (new) position of your particles compute the fields.
For the first phase, you need to integrate an ODE. For the second one, you need to solve a PDE.
I found a site that explains it and presents Matlab's examples (reference 1). It seems to use a finite difference method for the field solution and a Verlet integration to update the position of particles.
Additionally, it seems that ZPIC has been created with the purpose of teaching this. Citing the site (reference 2):
Our collaborators at IST have been developing a new PIC code for educational use: ZPIC, a 1D/2D self-contained fully relativistic electromagnetic code running with spectral and finite different solvers. The efforts with ZPIC are geared towards creating an open source computational toolkit for plasma physics education inside a virtual laboratory that can be run off-line. The ZPIC educational suite has minimal set of installation requirements (C compiler for ZPIC, and python3 and jupyter to run the notebooks). Because of its simplicity, we also encourage you to go through ZPIC source code and make your own changes.
They even have Jupyter Notebooks teaching different lessons.
References
Simple Particle In Cell Code in Matlab. https://www.particleincell.com/2011/particle-in-cell-example/. Accessed: April 7, 2020.
“ZPIC”. PICKSC, https://picksc.idre.ucla.edu/software/educational/zpic/. Accessed: April 7, 2020.