Muscle cells are specialized for contraction. Muscle contraction does not necessarily mean muscle shortening because muscle tension can be produced without changes in muscle length such as holding a heavy book or a dumbbell at the same position. Muscles allow for motions such as walking, running and processes such as respiration and digestion.
The body contains three types of muscle tissue:
1) skeletal muscle,
2) cardiac muscle, and
3) smooth muscle
To understand mechanism of muscle contraction see this video.
https://www.youtube.com/watch?v=sZuy356qkPM.
If you want to read muscle contraction go through this link
https://courses.lumenlearning.com/suny-mcc-biology2/chapter/muscle-contraction-and-locomotion/