Maybe you are gripping too tight? Or maybe the baby is just learning to gain dexterity and simply is discovering its own body and how it works so it does it by squirming.
Unless it is really abnormal and dangerous, then it is nothing to worry about. They do this until they can crawl. Just like they cry and scream until they can talk.