The nail gun must have gone off (shot a nail). It must have hit him (drove a nail into his body). Fortunately, it didn't hit a blood vessel (a vein or an artery) - it just stabbed him in a muscle or body fat area. Otherwise, if it had NOT missed a blood vessel, he would have had a much more serious injury.
PS: I love your spelling of separately. I've seen it so many times with an e instead of an a that I commend your solution of using them both!
(As a mnemonic, my mother taught me to remember, "I smell a rat in separate.")