How Friction Produces Heat