The Fundamentals of Discrete Particle Simulations