There are a few reasons for a clicking/popping sound.
The most common is crepitus, which typically occurs because of gas buildup in a joint. This is often not very harmful, if at all. However, it may be due to cartilage erosion.
Clicking can also occur when a tendon or ligament is snapping across a bony surface. This is not great, as the soft tissue will slowly erode over time.
Knee clicking can be due to hypermobility of the patella. A solution for this is strengthening the muscles around the kneecap. I don't know much about the anatomy, but have heard anecdotally that balanced training (for example, working the hamstrings equally) may help for some reason.
I have been diagnosed with Chondromalatia paetella .. which essentially means my knee caps do not move properly. For years I have suffered with not being able to bend my knees properly and the pain was always worse coming DOWN stairs than going up- which is why Docs took a while to figure it out . Normal Arthritis would cause the opposite problem.. since starting CrossFit and eating Paleo .. all of my symptoms are gone. I also did do acupuncture for a year before and that helped as well. My belief is that FISH OIL and regular exercise are the key to getting rid of symptoms like these.
I have always had creaky knees with various clicks and pops, especially when standing up from a sitting position. The two things that helped a lot were going Paleo and vitamin D supplements. The vitamin D especially I think had a huge impact. I started with 400IU per day, then 800IU, and today I started taking the 5000IU from iherb.com. Lots of threads here about vitamin D supplementation.
I've had this for a couple of years now - actually, only my right knee clicks when I squat or climb stairs. There's no pain at all so I haven't bothered checking it with a doctor.
Eating paleo haven't changed this and I doubt it's related to food. I would say it's not crepitus in my case, because it sounds more like a "mechanical" pop - it's probably related to cartilage.
I used to have this years ago. Never hurt at all, just made a clicking sound on the stairs, exactly like you say. I was going to Bikram yoga for a while and the poses where you basically stand flexing your quads and "lock your knee" as they call it helped me a lot. Don't have clicking anymore, and I haven't been to Bikram class in years either.