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.

If you want to read muscle contraction go through this link