Locking knee

Patient: I have ha a problem for about a year now with my knee and havnt bothered to see anyone about it . When my knee is kept straight for ten seconds or more it will lock itself and it is incredibly painful to bend it after it has locked . After short distances of walking I have to sit down as my knee will be causing me alot of pain. I am only a 13 year old female and would like to be able to walk without being in pain. What should I do ? What is wrong with my knee ? And it is only my right knee x