What causes muscles to generate heat on contraction?
First, it might be helpful to talk briefly about what heat is. It is a form of energy - molecular energy. Basically, heat is the amount of jiggliness of the molecules of a substance or object. When we look at a hot object, it doesn't apear to be moving any more than a cold object, but on a scale much smaller than we can see, it's molecules are moving faster than in a colder object. Read this for more information if you want.

There are at least two things going on in muscle contraction (as well as in other metabolic processes) which produce heat. The first is the chemical reaction that powers muscle contraction. You probably don't want to get into great detail, but basically there is a molecule which your cells use to store power, which we abbreviate as ATP. When our muscles use that power, an exothermic chemical reaction occurs that "burns" ATP, breaking it into two pieces (ADP and phosphate). That reaction releases energy. Some of that energy is used in the actual movement of the muscle. But some of it just "jiggles" the nearby molecules. Again that jiggling is the very definition of heat.

The second source of heat is probably much smaller: friction. In short, just about any time anything moves, nearby molecules get jiggled some more. Imagine trying to walk through a room packed full of harps. Everywhere you move, some of those strings get plucked and vibrate. It's a little bit like that. When your muscle fibers tighten and flex, they rub past each other and jiggle each others atoms. All of that jiggliness is heat, and the jiggling continues until it can transfer to some other medium, as when, sweat evaporates from your skin.