When should you go to the hospital for swelling in feet and ankles?

My feet have started swelling the past week. But when I press on my ankle the indent of my finger stays? Ive read this is a good time to go to the hospital?