If a cat rubs on a object, then it is adding it's sent to it, as a way of making the thing it's teritory.
If it rubs it's face on you that is a sign of affection and love.
A cat does this to mark their territory or (if to a person) they are responding; telling you that your theirs.
I heard that cats rub their heads against you to get their scent all over you. It's a sign of ownership; they are saying, "This is my human."
When we rub two objects together then heat energy is generated.
Domesticated cats mark their territiory by rubbing the top of their head on objects. There is oil glands in their head that marks a scent that is their own to say "this is mine."
Friction slows or stops motion when objects rub together.
Cats will rub their backs or bodies on you when being petted to transfer its scent onto you.
If you mean rub heads, it's a way of showing affection or a need for attention.
Gain or lose
Cats like moving objects. Computer screens mainly have moving objects on them, and cats especially love the mouse cursor.
Cats have tails for balance. That is why they can walk on such thin objects and don't fall on their heads or side. It's also what helps cats land on their feet. Also geese can sense you coming from 50 feet away! This makes scubba diving dangerous!
H
When we rub two objects together then heat energy is generated.