Nociception is the detection of painful stimuli. The sharp pain after the hit can be possible due to myelinated nerve fibers. In these fibers the potential action can jump from one Ranvier node to the another, this process is called saltatory conduction, therefore the stimuli can travel fast.
On the another hand, the prolongated and dull pain is due to unmyelinated nerves, where the signal travel significantly slower because of the absense of a myelin sheath.