The tendons that bend your fingers slide through small tunnels in the palm. When the tendon or its tunnel thickens, the tendon catches as it moves, so the finger clicks or stays bent.
It is more common in people with diabetes and in people who grip a lot.