When you say "popped out," exactly what do you mean? I will assume this is not a pop with every stride as in the case of some ITBS symptoms, but something unusual that pops back in place and disappears until the next incident. There are intermittent popping sounds from bad Patellar (knee cap) tracking and then there is dislocation. If one of your Cruciate ligaments was pulled or severed, for example, your Femur (thigh bone) could slide out of the socket of your knee joint, which could be very serious, even if it doesn't hurt. There are people who run (carefully) with this problem, but there is always the risk of further loosening of the joint and severe dislocation.
I will assume whatever popped out has been popped back, so any exercise that does not pop it out again or cause swelling and/or painful inflammation helps to strengthen the muscles that also hold this joint together. Proper exercises, preferably coupled with carefully targeted trigger-point massage to the Quads, can help if the problem is only Patellar tracking, by balancing Quad tension on the Patella as it rides up and down in a notch on the front of the Femur. A chronically tight outer Quad and weak/spasmodic inner Quad often combine to cause this, but be careful with the terms "tight" and "weak." Think in terms of proper function vs. dysfunction A tight and overexercised muscle can be quite useless, and a weakly functioning muscle can be quite strong. Your brain and spinal cord will determine how much flexion each muscle will be capable of based on its condition, whether it is otherwise strong or not, and operate it accordingly. Inflammation under the patella will also result in reduced flexion of the inner Quad. No matter what the cause or level of training, too much, too soon, or too fast will give a well trained world-class athlete a flat tire.
Ligaments are most important though, and a loose one is not likely to just heal properly without surgery (can you manually slide the Femur off the joint?). In either case, solve the original problem asap before getting back out on the road. Otherwise, you risk damage to the joint cartilage or increased instability of your knee.