How is ATP involved in muscle contraction?
ATP prepares myosin for binding with actin by moving it to a
  higher-energy state and a "cocked" position.
  
  Once the myosin forms a cross-bridge with actin, the Pi disassociates
  and the myosin undergoes the power stroke, reaching a lower energy
  state when the sarcomere shortens.
  
  ATP must bind to myosin to break the cross-bridge and enable the
  myosin to rebind to actin at the next muscle contraction.





  The muscle contraction cycle is triggered by calcium ions binding to
  the protein complex troponin, exposing the active-binding sites on the
  actin. As soon as the actin-binding sites are uncovered, the
  high-energy myosin head bridges the gap, forming a cross-bridge. Once
  myosin binds to the actin, the Pi is released, and the myosin
  undergoes a conformational change to a lower energy state. As myosin
  expends the energy, it moves through the "power stroke," pulling the
  actin filament toward the M-line. When the actin is pulled
  approximately 10 nm toward the M-line, the sarcomere shortens and the
  muscle contracts. At the end of the power stroke, the myosin is in a
  low-energy position.
  
  After the power stroke, ADP is released, but the cross-bridge formed
  is still in place. ATP then binds to myosin, moving the myosin to its
  high-energy state, releasing the myosin head from the actin active
  site. ATP can then attach to myosin, which allows the cross-bridge
  cycle to start again; further muscle contraction can occur. Therefore,
  without ATP, muscles would remain in their contracted state, rather
  than their relaxed state.


Summary from: https://www.boundless.com/biology/textbooks/boundless-biology-textbook/the-musculoskeletal-system-38/muscle-contraction-and-locomotion-218/atp-and-muscle-contraction-826-12069/

Also this:

Essentially look up the cross bridge cycle (http://muscle.ucsd.edu/musintro/bridge.shtml)

I would also suggest reading it from the master himself here:
Huxley, A. F. "Muscular contraction." The Journal of physiology 243.1 (1974): 1-43.