The CPM machine is attached to a knee or other limb on which the surgery was performed. While you relax, the machine constantly moves the knee or other limb through a range of motions for a period of time. CPM is used to prevent joint stiffness, relieve pain, and regain normal motion.