I will try to be brief here but this is a complex phenomenon.
The sarcomere is the unit of skeletal muscle contraction and, briefly, works this way.
Motor neuron induction into the sarcomere.
Sarcomeric reticulum releases calcium ions.
These ions bind to the thin filament and open the docking spaces for the myosin head ( which is on the thick filament ) to dock.
====== thick ( somewhat as they are oriented )
The myosin head is primed to extend by having ADP and a phosphate group in its active site.
The head(s) ( there are thousands of them ) extend, dock on the thin filament and push. The think filament myosin heads are anchored in place but their pushing move the thin filament and the sarcomere contracts..
The calcium ions fall away and the myosin head relaxes while an ATP docks on its active site and the ATP is hydrolyzed to ADP and a phosphate group. The sarcomere relaxes.
The whole process then can begin again.
I suggest you get a depiction of the sarcomere and try to follow along with this over simplified version of muscular contraction I have given you.