Tarta vs. torta vs. pastel

In Spanish, there are different words to describe various forms and types of cakes, such as 'tarta', 'torta', and 'pastel'. While they can sometimes be used interchangeably, they do have their own unique connotations in different Spanish-speaking regions.

Tarta

This word is typically used to refer to a cake that is styled with various layers, fillings, or decorations. It's commonly used in Spain.
Para mi cumpleaños quiero una tarta de chocolate.
(For my birthday, I want a chocolate cake.)
Hoy he cocinado una tarta de manzana.
(Today I cooked an apple pie.)

Torta

The meaning of 'torta' can vary widely by region. In many parts of Latin America, it usually refers to a type of sandwich. However, in countries like Argentina or Uruguay, 'torta' is used for cakes baked for special occasions.
Hoy vamos a preparar tortas para la fiesta.
(Today we are going to prepare cakes for the party.)
En mi cumpleaños siempre pido una torta de tres leches.
(On my birthday I always ask for a three milk cake.)

Pastel

This term can refer to any type of cake in general. However, it is more formally used to refer to a dessert that is both sweet and baked. It's widely used across all Spanish-speaking countries.
Mi madre hace el mejor pastel de zanahoria.
(My mother makes the best carrot cake.)
Vamos a comprar un pastel para la despedida de Juan.
(We are going to buy a cake for Juan's farewell.)

Summary

'Tarta', 'Torta', and 'Pastel' all refer to variations of cakes in the Spanish language. 'Tarta' is typically layered or decorated and commonly used in Spain. The term 'Torta' varies by region, referring either to a type of sandwich or a special occasion cake mainly in Argentina and Uruguay. Lastly, 'Pastel' refers generally to any type of sweet baked dessert and is universally understood throughout Spanish-speaking countries.