Is heat the transfer of thermal energy between systems while work is the transfer of mechanical energy between two systems and energy of rubbing hands together?
Your understanding is almost correct! Here's a breakdown of the concepts and your example:
Heat transfer vs. Work:
Heat transfer: You're right, heat transfer is the transfer of thermal energy between systems due to a temperature difference. This means energy flows from the hotter system to the colder system until they reach thermal equilibrium (same temperature). Examples include conduction (metal spoon in hot soup), convection (air rising around a radiator), and radiation (sun warming your skin).
Work: While your definition is partially correct, it needs refinement. Work is the **transfer of energy between two systems through the application of a force over a distance. The energy transferred can be mechanical energy (e.g., pushing a box), but it can also be other forms like electrical energy (battery powering a motor) or thermal energy (compressing a gas).
Rubbing hands together:
Your example is spot on! When you rub your hands together, you are doing work on them by applying a force over a distance. This work gets converted into thermal energy due to friction. This friction causes the molecules in your hands to move faster, increasing their kinetic energy, which we perceive as heat. So, the energy doesn't magically appear; it's simply transformed from one form (mechanical) to another (thermal).
Here's an additional point to remember: Both heat transfer and work are ultimately related to the Law of Conservation of Energy, which states that energy can neither be created nor destroyed, only transformed from one form to another. So, in the hand-rubbing example, the total energy remains constant, but its form changes from mechanical to thermal.
Heat and Work and Energy all have the same dimensional units, all being different names for the same conceptual entity. For all of your thermodynamics questions, you need to define bounds of the system being modeled, or unbounded conditions thereof. Until you have more detailed definition of the problem statement, you will run in circles because of the interchangeable dimensionality of the three terms above.