The basic principle
If something is moving and you subject it to a sideways force, instead of moving in a straight line, it will move in a curve - deflected out of its original path by the sideways force.
Suppose you had a cannonball travelling past you and you wanted to deflect it as it went by you. All you've got is a jet of water from a hose-pipe that you can squirt at it. Frankly, its not going to make a lot of difference! Because the cannonball is so heavy, it will hardly be deflected at all from its original course.
But suppose instead, you tried to deflect a table tennis ball travelling at the same speed as the cannonball using the same jet of water. Because this ball is so light, you will get a huge deflection.
The amount of deflection you will get for a given sideways force depends on the mass of the ball. If you knew the speed of the ball and the size of the force, you could calculate the mass of the ball if you knew what sort of curved path it was deflected through. The less the deflection, the heavier the ball.