No, you contract muscles to flex or extend joints.
Muscles can only contract, or get shorter, yes.
Joints either extend, moving attached segments away from some axis on the body, or flex, move them toward the body.
In the case of the elbow joint, the contraction of the biceps causes the joint to flex bringing the forearm closer to the upper arm; the contraction of the triceps causes extension pushing the firearm away.
Similar pairs cause knee extension/flexion and extension/flexion of the various portions of the spine.