Sooo many things it could be. Probably impossible to make a forum diagnosis... Maybe time to visit a physio if it's actually stopping your training, eh? I assume it's hurting you too and not just clicking? Is it on the outside, or underneath/below the patella (or somewhere else)? Those would be the most common - either ITB or Patello-Femoral syndrome - although I've never heard of clicking being part of those (but then, I'm not an MD
). Do you have a foam roller? One should become your best friend during your big mileage phases!
Which IM are you doing?