Before we understand how muscle contraction happens, we need to get familiar with the structure of our muscles. All our muscles are made up thin fibers; these fibers are made up of myofibrils, which in turn are made up of Sacromere units. Inside the Sarcomere there are two different types of protein filaments called actin and myosin filaments. The contraction and relaxation of the muscles happens when these two protein filaments slide over each other.
Myosin molecule looks like a golf club with a big head and a tail; hundreds of these myosin molecules are attached together with their heads protruding out in all directions forming a thick myosin filament. Actin molecules on the other hand are arranged in a helical fashion to form a thin filament. Every actin molecule has a binding sight where the head of the myosin filament can attach. These actin and myosin filaments are arranged in such a way that each myosin filament is surrounded by actin filament and vice versa. All the actin filaments are attached to a thick protein plate called the Z-disc. This whole structure is then repeated to form the full muscle fiber.
To understand the interaction between myosin and actin and how it causes muscle contraction, imagine you and your friends are trying to move a big screen on wheels in front of you. There are ropes attached to this screen and these ropes have these rungs where you can secure your hands. You and your friends form line and start pulling the screen towards you. This is exactly how muscle contraction happens; just replace the hands of you and your friends with heads of the myosin molecules, the rope and its rungs with actin filament and the screen with the z-disk.
For the more scientifically disposed readers below are the details; note it is still a simplified version of what actually happens. Whenever nerves give signal to contract the muscle, myosin head attaches to the actin molecule. ATP molecules are released inside the muscle and a four step process ensues
Step1: ATP molecules attach to the Myosin head causing the myosin head to detach from the actin molecule.
Step2: Immediately after the myosin head detaches it hydrolyzes the ATP molecule, breaking the ATP molecule into an ADP molecule with phosphate and energy. This causes the Myosin head to cock and weakly bind to the next actin molecule in the actin filament.
Step3: The phosphate is released from the myosin head which cause the myosin head to rotate back to its original orientation and push on the actin filament inwards
Step4: The ADP molecule on the myosin head releases and this causes the myosin head to attach back to the actin filament.
This cycle is then repeated many times over to cause the full contraction of the muscle. To relax the muscles the myosin simply detaches from the actin.