Flintlock gun appear in 1630. The spark was used to ignite the gun powder in the touch hole. It was supplied by a sharpened piece of flint clamped in the jaws of a cock which when released by the trigger, struck a piece of steel called the frizzen to create the necessary spark.
The spring-loaded arm that holds a piece of for or pyrite is referred to as a cock because it resembled a rooster. The cock had to be manually reacting after each firing, and the flint had to be manually reset after each firing and the flint had to be replaced periodically due to wear from the frizzen. The flintlock was widely used during the 18 and 19 centuries in both muskets and rifles.