Muscles contract through the interaction of actin and myosin, two types of proteins. When stimulated, myosin heads bind to actin filaments, causing them to slide past each other. This shortens the length of the muscle fiber and results in contraction.