The primer must be dented in order for a gun to fire. The hammer and mainspring have been eliminated from the frame of a striker-fired gun. Instead, the mainspring is positioned within the slide and acts on the firing pin directly. In this instance, the firing pin is called a striker. Rather than being hit by a hammer, it does the hitting itself.
Some striker-fired guns are single-action (SA), where the cycling of the slide fully cocks the striker and the trigger serves only to release it. Others are double-action (DA), where the trigger pull fully cocks or finishes cocking the striker, then releases it. Some are DA/SA and may even have an external decocker so a round can be chambered with the hammer down.