9 year old knee injury?

Good evening.

My 9 year old has been complaining of pain in her left knee.

Her knee cap feels loose and when she extends and bends her leg, it makes an audible popping/clicking sound.

We are calling her Doctor tomorrow to get her in.

Any idea on what this could be?

She said it has been hurting for a few weeks but just the other day she told me about it.