If you feel something catching behind your patella, you could have what is called a "bucket handle tear" of your meniscus. Imagine a flap of meniscus that has torn off of the edge of the structure and is just hanging on at one end. That flap can get caught between the end of the femur / tibia / patella. One minute it is impinging, the next it is not. The symptom comes and goes depending on where the tear is hanging at that moment.
Or that might not be it at all. If your knee hurts and is making strange sounds or sensations, I would suggest you see an ortho and get a real diagnosis. Take it from me and the rest of the old farts with bad knees on this forum, you really want to take care of those joints.