Though not all muscles work in pairs, the general principle is that one muscle moves a bone one way, and the other muscle moves it the opposite way.
Why? Because muscles can only pull, not push.For example, when you bend your arm, the biceps muscle pulls. When you want to straighten it, the biceps muscle cannot push it back. Instead, the triceps muscle that's on the back of the arm pulls in the other direction.
Hope this helps!