When a cat is a kitten, he kneads his mother's tummy to stimulate the production of milk when he's nursing. At the times he's nursing, he feels very happy and secure, getting his tummy filled and being snuggled up close to mom. So he learns to associate the action (kneading) with the feeling (happiness and security). As he gets older, he repeats the behavior on people he loves in order to reproduce that feeling. So you should feel lucky that he's doing this to you -- it means he loves you and he feels happy and safe with you.