Welcome to Healthcaremagic.
The popping sound could be due to rubbing of the two ends of the bone and there could be a ligament injury
which could have caused this.
I suggest you to immobilize the joint for a week with crepe bandage or a knee brace
.This would suffice and taking pain killers when there is pain is all you need.
Wish you good health.