I have lived with six cats since I was little, some of them loved to jump on my lap and start pumping their paws up and down. I called it a "cat massage". My parents' orange tabby enjoys sitting on my lap with his belly up, pumping his paws and extending and retracting his claws in midair. My current 3 furry babies take our bed as their own little sanctuary. Whenever they land on the comforter or a soft blanket, they'd engage a bit of a kneading action. As adorable as it is, why do cats feel the need to knead?
Since they were born
Cats start this rhythmic kneading ritual since they were born. They do so on their mother cat's belly around the nipples while suckling to push the milk out faster. As kittens progress into adulthood, it becomes a habit for cats to knead when they touch soft objects that resemble their mother's full belly. If your cat is pumping their paws on your lap, it is a sign of trust and a way for them to convey joy and happiness for having you around.
Claws may prick
Though many cats do not extend their claws all the way during kneading, some cats can be a bit of an enthusiastic kneader. The best way to avoid having nails plunge into your skin is to clip their nails every so often. If this does not work and you want the cat to stop the habit on you, you can do so by simply standing up and walking away from your cat. Soon your cat will learn to knead less on your lap through trial and error.