Please see a physiotherapist.physiotherapist will assess you and find out the reason of getting the pain.There are multiple reasons of a knee pain.It can be a soft tissue injury, inflammation,degenerative disease.Some time the issue may not be exactly on knee but somewhere in your surrounding muscles but symptoms may show in your knee..There are multiple exercises to stretch and strengthen the surrounding muscles.Check with a physio therapist will guide you thoroughly .
Next Steps
put ice pack for 10 mins .3 times a day atleast to reduce the swelling