Torta was the Latin word for a 'flat cake', and has entered many languages meaning something like either 'cake' or 'bread prepared without yeast'. Its meaning has been significantly distorted over the centuries, to the point where ordering a torta might get you almost anything, depending what part of the world you are in. An example of this familiar to Americans might be the tortilla, an unflavored disc of flat bread that looks nothing like a 'little cake'. Without even leaving Mexico, we can find even more confusing tortas.
In Mexico, ordering a torta is most likely to get you a sandwich on a large bun (often looking exactly like an oversized hamburger bun), usually containing some form of shredded meat and lots of vegetables as toppings. The torta is the sandwich itself; the buns used for tortas have their own names (bolillo and telera being popular breads). You will get much the same sort of sandwich if you order a torta in Cuba.
Further south, many other South American countries do use torta to mean cake, although in Uruguay and Argentina the torta frita is a type of flatbread, in Guatemala the torta is a type of sweetbread often made with almonds, and in Peru you will get a cake, but it may be a Torta Helada, with layers of frozen pudding, jello, and custard. In Brazil torta means something like pie, and you will have to specify what kind of torta you are talking about; otherwise it's a toss-up whether you will get something like a cream pie (of the Banana cream pie type, rather than the chunks of fruit variety), or something like a chicken pot pie with an eggy quiche-like topping. Or, if you are in a fancier restaurant, a piece of cake. And all of these may be modified by any number of words (generally words that can be found in a standard Spanish dictionary) to result in anything from an omelette (Torta de huevo) to a spiced tomato tart (Torta di pomodori).
This level of diversity is not limited to South America. In much of Europe (in France, Italy, Spain, and Portugal) torta is used with the same range of diversity as it is in Brazil, with dozens of sweet and savory options. You may also want to look up the German torte, a rich cake often with exciting fillings and glazes. In Swedish, on the other hand, tårta just means 'cake'.
In the Philippines a torta is usually an omelette, often with meat mixed in -- except in the Visayas and Mindanao regions, where it is a small sponge cake. In Japan it is a brand of wafer sandwich cookies. In Cape Verde it is a pie or, more often, a tart. This is certainly not an exhaustive list, and there are plenty of tortas yet to discover.
Torta is a great word for the adventurous eater to know and use.