My knees cause me serious pain bending them and walking or getting up or sitting causes severe pain. What should I do?

Inflammation . I would suggest you try some acetaminophen(tylenol) or ibuprofen(motrin or advil) for the pain first. However, you will need to see your primary care doctor or an orthopedist to get some x-rays done. You have arthritis or some or other inflammatory problem.