The joints have a small amount of lubrication fluid that helps the cartilage and bone move about without difficulty and friction.
However, when there is an excess amount of fluid in the joints it can greatly affect the proper functioning of the joints and also cause painful symptoms.
A swelling in the knees can be due to some firm of injury to the tendons, ligaments and meniscus.