Given the following context

I put the cake away in the refrigerator . *It* has a lot of leftovers in it.

Are "the refrigerator" and "It" the same?
yes