out of the frying pan, into the fire

Out of the frying pan, into the fire is an idiom which refers to going from a bad situation to an even worse situation. Literally speaking, a frying pan is considered the bad situation in that it is very hot to the touch; but if you go to the fire, it is even hotter and can cause more damage than a hot frying pan. In this sense, it is used figuratively to describe a situation which has gone from bad to worse.