Muscles can only pull in one direction so they must work together. One muscle contracts pulling the bone whilst the other relaxes and lengthens.
Muscles are made of cells that contract (shorten) and produce movement. When a muscle contracts, it pulls on a tendon which causes the bone to move.
A joint is the point where two bones meet.