there are a number of diagnosis that can cause popping in the knee. the commonest is a meniscal tear. this also causes swelling in the knee and sometimes a feeling of giving way. your dr can do physical tests on your knee to make the diagnosis but this often is confirmed on an MRI
scan. if you do have a meniscal tear then this can be removed or repaired arthroscopically (through a camera).