The sliding filament theory explains the mechanism of muscle contraction based on the sliding motion of actin and myosin filaments past each other, which shortens the sarcomere and thus the muscle fiber. This process is powered by ATP and regulated by calcium ions and the troponin-tropomyosin complex, enabling muscle movement and force generation.