What's actually causing it
Your kneecap (the patella) sits in a shallow groove at the lower end of your thigh bone and glides up and down in it as your knee bends. On its inner side sits the medial patellofemoral ligament, or MPFL, one of the soft tissues that keep it in that groove.
The typical dislocation happens when your foot is firmly planted, your knee is pushed inwards and your thigh bone rotates inwards over the top of it. The kneecap is left behind and slips out to the side 1. In real life that looks like a netball landing, a pivot at footy training, or a slip that twists the knee. When the kneecap goes, the MPFL is injured 3. The kneecap can also scrape the joint's cartilage, or break off a small piece of bone and cartilage (an osteochondral fracture) from either the kneecap or the thigh bone 1.
Why do some knees dislocate and others don't? A few things make it more likely: an MPFL that's already been damaged, a kneecap that's unusually shaped or positioned, a shallow groove, or loose, hypermobile joints 1. Growth plates that are still open and generally flexible ligaments add to the risk. So do some things physiotherapy can work on, such as an underdeveloped inner quadriceps muscle (the VMO) or outer thigh muscles that overpower it 2.
Whether girls and women are more affected is disputed. One Australian guideline finds no clear difference between the sexes 1. Another guideline and a Cochrane review suggest it's more common in females 2,3, possibly because of limb alignment and looser joints 4.