Internal ballistics is the study of a projectile's behavior from ignition until it exits the gun barrel. It examines factors like lock time, ignition time, and barrel time. Piobert's law states that gunpowder burns layer by layer. Newton's third law means that for every action there is an equal and opposite reaction, causing recoil. Recoil velocity can be calculated using the projectile and gun masses and velocities. Rusting and erosion over time degrade the gun barrel and reduce accuracy.