Similart to how muscles work in pairs, when one muscle shortens the opposite muscle lengthens e.g. the biceps shortens to bend the elbow at the same time its opposite muscle, the triceps, lengthens to allow the movement to occur. Good working between pairs of muscle allows for smooth controlled movement.