why does a gun recoil ?
A gun applies a force on the bullet to make it move. So, according to third law of motion, the bullet will apply a force backwards on the gun as well.
Also, you can apply newton's second law of conservation of momentum here.
(as 3rd law can be derived from the second law itself)