I would assume they would work the same as how a real firearm would work, a round is chambered and the hammer strikes the primer and sets off a cap. The force of the cap going off causes the casing to eject and the next round would then be chambered to start the process again.
Heres a pic of some caps
Load your caps into your fake shells
Load your rounds into your magazine and safety off and party on!
If you wish to learn more, google will yield much information, as all the info I have just provided you was googled in less than 2 minutes, read, and rewritten as this post for you.