The phrase "out of the frying pan and into the fire" means to go from a bad situation to an even worse situation. It is similar to the phrase "jumping from the frying pan into the fire," which means to make a change expecting it either to make no difference or be a slight improvement, when it ends up making the situation much worse.
Find the meaning of the phrase "out of the frying pan and into the fire"