This question may be a stupid question, but I'm really curious.
After playing games like HL2, GMod, or Angry Bird, and using physics libraries like Box2D, I began to wonder "how a physics engine simulates physics?"
Like lexer and parser are used to understand the code when compiling and ray-tracing is used to render a 3D scene, I think that there's some notions (other than collision detection) which are used in the physics engine to simulate physics, like calculating torque and velocity of a pentagon performing barrel roll.
How does a physics engine actually simulate physics? What notions are used? Is there any 'tutorial' on the web about making physics engine like this one, which demonstrates ray tracing?