Quick answer
Торт is a layer cake, пиро́г a filled pie, пирожо́к a small hand-held one. Choosing wrongly is the classic slip.
Baked
Sweet things
Talking about it
With the tea
Моро́женое is an adjective
Literally “the frozen thing” — it declines like an adjective: моро́женое, моро́женого, с моро́женым. The same applies to сла́дкое (sweet things) and второ́е (the main course).
Refusing politely
A Russian host will offer repeatedly. Спаси́бо, я сыт / сыта́ — thank you, I’m full — is the real stop. Я не ем сла́дкое works too, and nobody takes offence. What will not work is a single quiet нет: that is heard as politeness.
Typical mistakes
Я хочу́ пиро́г — meaning a slice of cake
Я хочу́ торт.
торт is the layer cake; пиро́г is a pie.
моро́женый
моро́женое
It is a neuter adjectival noun.
Check yourself
Which word means a layer cake?