First the flint hits the frizzen, making a spark. The spark lights the fine gunpowder in the pan then the fire makes it's way to the hole and into the chamber, then the gun fires. Normal delay, 4-8ms. Occasionally there is a "hangfire", where the gun shoots a second or more late. And sometimes it doesn't fire - a "flash in the pan. Pictures here: