Muscles move body parts by contracting and then relaxing. Muscles can pull bones, but they can't push them back to the original position. So they work in pairs of flexors and extensors. The flexor contracts to bend a limb at a joint.
Let's say you enjoy swimming. One day you decide to swim alone. But it's a risky idea because you could drown and no one would be there to help you in time. So it's best to have others around incase you have an accident or need help.