The above answers are correct, I just want to add a distinction between the different muscle types.
There are 3 types of muscle tissues:
Skeletal muscle (locomotion)
The skeletal muscle has visible striations under the microscope, because the myofilaments are aligned: they are all parallel. During contraction, the thin filaments slide over the thick filaments - at the end of the contraction the Z lines will be closer together. The filaments stay the same length, they just slide over one another, shortening the muscle. The muscle doesn’t contract by “going” in a particular direction, it shorts everywhere and the alignment of the filaments enables the muscle to shorten in only one dimension. The muscle is connected to the bone by tendons. When it shortens, it pulls on the tendons which pull on the bone, bringing it closer. A skeletal muscle cell can be up to 30cm long (Sartorius muscle).
Cardiac muscle (in the heart)
Cardiac muscle cells are very similar to skeletal muscle cells, however the fibers are interconnected via intercalated discs, which enables them to work in an even more synchronized way.
Smooth muscle (in the vascular system, the gastrointestinal tract, etc.)
Smooth muscle filaments aren’t as organized as the ones in skeletal muscle. Therefore, the shortening can occur in all directions within the cell. It results in the shortening of the cell in more than 1 dimension.
Also, many organs such as the stomach have more than one layer of smooth muscle, providing constriction in many different “directions” (longitudinal layer, circular layer and oblique layer).