The cap was fastened into the contact hole on the gun (prolonged to sort a "nipple") and ignited with the influence in the gun's "hammer". (The hammer is about the same as the cock found on flintlocks apart from that it doesn't clamp onto something.) In the case of percussion https://sig-saeur-handguns39370.thezenweb.com/The-smart-Trick-of-guns-That-No-One-is-Discussing-53244378