General knee swelling coming on suddenly
Sudden knee swelling is usually consequent on an injury. The swelling in this case ilikely to be from bleeding (haemarthrosis), and the patient's story and the investigations should reveal the cause, such as a torn cruciate ligament or meniscus or a fracture inside the joint.
If there has been NO injury, the swelling might be due to an inflammatory condition such as rheumatoid arthritis and the fluid is probably joint fluid (effusion). Joint infection is uncommmon but may follow surgery or other interference and the patient may experience sudden hot painful swelling, and is likely to feel very unwell.
General knee swelling coming on gradually
Gradual knee swelling affecting the whole joint is likely to be osteoarthritis or other degeneration such as a degenerative meniscus.
Localised-swelling
Localised swelling is often from overuse, such as prolonged or repetitive kneeling. Examples are 'carpet-fitters knee', 'clergyman's knee', 'housemaid's knee'. These are usually due to 'bursitis' where a normal soft tissue cavity becomes inflamed and fills with fluid.

