When a cat rubs its head against its owner, it's a sign of affection. The purring sound it makes indicates that it's in a good mood. 
Cat body language also includes: when a cat is in a good mood, its eyes will be half-closed, its ears slightly tilted and relaxed, its tail will wag gently, and it will rub its paws up and down lightly, without staring intently at anything. Cats also feel sadness, but unlike humans, they don't cry; instead, they express it through vocalizations. Different cats have different vocalizations, not just one. If a cat is tearing up, it's usually due to pain or an eye condition.
When a cat is extremely frightened or angry, it will wag its tail rapidly from side to side, flatten its ears, arch its tongue, dilate its pupils, open its mouth to reveal its teeth, raise its whiskers, and hiss fiercely to intimidate enemies. If a cat rolls or lies down on the ground with its most vulnerable belly facing upwards, it indicates that it trusts the people around it. However, you should not touch its belly casually.