This used to happen to me every so often, mainly playing basketball. If I wasn't wearing a knee brace and it popped out, I would have to hit it until it popped back in. It sucked. I don't remember it keeping me out for an extended period of time though, maybe a day for the soreness to wear off and I would wear a knee brace for a while after that. Apparently it turned out the ligament on the inside of my knee was too loose, and the one on the outer part was too tight, so it would pull my kneecap over to the side of my leg. It popped out one final time walking out of Mugshots back in college and I couldn't get it back in so I went to the ER. Had surgery on it 6 months later and had no issues since, that was in 2006.
Not sure if that helps you , but that is my experience with it.