The kneecap (patella) glides over a small groove at the end of the thighbone (femur) when you bend or straighten your leg. If the kneecap slips out of position, it dislocates and becomes unstable. The most common cause is turning your body while your foot remains planted on the ground, during sport or dance for example, but it can also result from a direct blow during a contact sport or fall.