You have not mentioned your age,if you are elderly there are chances of having osteo arhteritis of the knee.
Is there any history of accidental injury
to the joint ? after injury with passing time one gets osteo artheritis.
Go for X-ray and find out the cause.
ok and bye.