If you have a standard shortening- or butter-type cake (like the cake mix kind), and if it's frosted with American buttercream (shortening-powdered sugar-water), place the cake in the freezer. When it's hard, after about two hours, wrap it tightly in plastic. Thaw, still wrapped in plastic, in the refrigerator for an hour, or unwrapped at room temperature.

If it's any other kind of cake or any other kind of frosting, you'll have to give more details to get a good answer.

(Most of the cakes in the refrigerated display case at your local grocery arrive frozen, exactly the way you see them. At 0 degrees, they last about six months; they're taken out of the freezer as needed to keep the case looking full. Thawed, they have a shelf life of five days, and you have three days after that to either eat or re-freeze the cake.)