Both heat and cold can relieve pain in your knee joint. If using heat, moist heat (hot water bottle or warm bath) seems to work better than dry heat. Be careful - heat should be warm, not hot, and should be applied for 15 -20 minutes, several times per day if needed.
Cold therapy seems to work better for acute joint pain and swelling. Cold helps relieve inflammation and can be used several times per day. Use caution, however, if you have poor circulation or numbness in your leg.