That warmth is caused by a force called friction. When objects like your hands come in contact and move against each other, they produce friction. Friction happens when you overcome the resistance of one object rubbing against the other. The force of the friction is opposes the direction of the motion. If you just put your hands together, there's no resistance, so there's no friction produced. Rub them together and there's friction.
The rougher the surfaces that are rubbing together, the more friction is produced. Try pushing a brick down your driveway. It takes a lot more force than rubbing your hands together. That's due to the surfaces being very rough. When you have to work to overcome friction, some of the energy you use is converted to heat. The more friction, the more heat. In fact, you can even produce sparks by dragging a heavy masonry or metal object over pavement.