When I press into my leg the dent stays for a ling time and my ankles are swelling up?

Edema. The leg and ankle swelling indicates fluid leaking out of blood vessels and accumulating in the tissues. This may be due to fluid overload, infection, inflammation, heart or kidney failure, certain medications, and prolonged standing or sitting. Things that can help include moving your legs, raising your legs, losing weight, and a low-salt diet. See your doctor if the swelling gets worse.
Edema. You have what sounds like edema. There are several potential causes of this, including obesity, venous disease, low protein states, kidney disease, or even clots or heart failure. I would explore this with your doctor to see what's the cause and what can be done about it!