How do muscles produce mechanical energy?
Your body takes in chemical energy in the form of food, drink, etc. As your body breaks down what you put in, chemical energy is stored in the muscles. Muscles transform the chemical energy into mechanical when they contract. Oxidation of fats and carbohydrates and anaerobic chemical reactions are both used to move muscles. These chemical reactions produce ATP. Muscles use ATP to move the myosin heads "against" actin which causes the muscle to contract.