To be more specific, they were used to boost ammonium nitrate mixtures - ANFO, etc. Holes are drilled into the rock, then loaded with the appropriate explosive mixture. the boosters/primers are typically loaded at the deepest part of the hole, sometimes intermittently after. All tied in with detcord/primacord. You used to see them occasionally, but they have all been snapped up by mining collectors, like the old blasting cap tins. Here are some of mine, shown next to a half pound block of TNT for size comparison. In the US they were mostly replaced with pentolite cast boosters, encased in cardboard. Picture of a dummy pentolite booster after.