There could be several reasons why a cat keeps rubbing against you:

The cat is molting. It's trying to rub off the shed fur.
The cat has a skin condition. It's itchy and tries to relieve the itch by rubbing itself.
Cats mark their owners by rubbing their scent on them.
Cats are using affection to get their owner's attention and companionship.
Begging for food. For example, when the owner is holding a can of food and preparing food for the cat, or when the owner has just arrived home and the cat is already hungry, the cat may come over and rub against the owner's feet.