When you rubbed your hand back and forth, the friction caused your skin molecules to vibrate faster. We feel this as heat. Friction causes heat and other kinds of energy to form in many ways around us. The friction between the moving parts in a computer requires a fan to cool it down, and the friction of moving air can result in lightning storms.
Different animals can feel heat in different ways. Many creatures, like certain snakes, can feel heat at a distance. Some beetles can feel the heat of a forest fire from many miles away.