1. Seems you are suffering from anterior knee pain
. Causes are many depending upon the age and other co-morbid conditions.
2. Usually it is caused by some degeneration of the cartilage
beneath the patella
. These pain occurs whenever the patella touches the femur and it happens during the 90 degree bending movement.
3. Initially taking an Xray of knee - AP / Lateral / Skyline view can guide us to find out the cause
4. Quadriceps exercises, Knee cap with patella support, along with NSAID's +/- glucosamine
/ diacerein combination might be helpful
5. If problem persists best would be to undergo Diagnostic arthroscopy
which is gold standard for such symptoms. MRI would be the second best option.