Slam fire occurs when the firing pin is stuck in the bolt carrier group in a position to hit the primer during charging (loading a bullet into the chamber). Normally the firing pin is free to move and does not have enough mementum (if the firing pin is massive enough and there is sudden impact in the wrong direction it could have sufficient mementum, assumming a round is already loaded) to light the primer but if parts are out-of-spec or poorly maintained the firing pin could be stuck in the forward position and hit with enough force to ignite the primer without the hammer hitting it.
If the primer protrude outsides outside of it's well it may be possible the bolt face can set it off or easier for the firing pin to set it off, but you can inspect for that. Some primer are easier to setoff, likely military spec primers are difficult to setoff to prevent slam fire.