Explain as follows.
The main influencing factors of SN2 reaction are steric hindrance, small steric hindrance, fast reaction rate and easier reaction. Therefore, the reaction rate of primary carbon is higher than that of secondary carbon and tertiary carbon. However, when the halogen is directly attached to the double bond, the N electron of the halogen is delocalized due to the conjugation of the halogen and the double bond, and the carbon-halogen bond has the property of partial double bond, so it is not easy to react.
The reaction of SN 1 is a monomolecular reaction, and the decisive step is the step of generating carbocation. The main influencing factors are electronic effect and spatial effect. The reaction rate of tertiary carbon is higher than secondary carbon and higher than primary carbon.
If you have any questions, please ask.