How to deal with tantrum?

There are times when my baby tantrums. he'll kick his legs straight up then drop them hard over and over and doesn't want to let me hold his arms or hands to pick him up... I'm a ftm and had no idea babies could tantrum this young... if he were 2 I would know how to handle it but what do you do when they're this young?