Technically, hammer follow down and slam fire are two different things. The former involves the hammer (for whatever reason) following the bolt down as it closes. The hammer will sometimes retain enough energy to fire the gun, though this is not reliable. In guns like the M1, M14, and Mini14, a bridge in the receiver does not allow the firing pin to go forward until the bolt is fully locked.
Slam fire, on the other hand, is caused when the bolt itself going closed sets off the cartridge. True slamfire in such rifles can be the result of a defective or broken firing pin, extremely sensitive primer, or a too-heavy firing pin. If a slam fire ignites the primer before the bolt is locked (as would happen with a broken firing pin stuck in the forward position), there will be unpleasant happenings.
SMGs usually use slam fire, but with low power pistol cartridges which do not require a locked breech.