Hi,
The "popping" sound which you are describing could be a few things...We have four major ligaments around our knee: The Medial Collateral Ligament, The Lateral Collateral, Posterior Cruciate, and the Anterior Crutiate - all holding the knee in place. All, which need special care not to injure. (warm-up, cool down, stretch, strengthen the muscles around the knee...)
As we age and as we work out, the cartilage which covers the top of the bones (Articular Catilage) connected to the knee - femur, tibia, and patella wears down and gets small tears or causes the build up of Synovial fluid which gives us that stiff feeling sometimes. Well, any breakdown of cartilage leads to arthritis, osteoarthritis, or tendonitis. Any fluid build up or rubbing of bones causes the popping sound.
That it is why it is important to do the things I said above. Ice the area as well. You can do anything which doesn't hurt. for squats, try going down about 45 degrees instead of 90 degrees until you build strength. As always, listen to your body.
Well, I am a sports psychologist and not a MD, but this is from years of exercise physiology. So, ask your doctor for more specifics.