1. on top of each other
When you place one object on top of another you are stacking them. Usually, having a flat surface makes stacking easier; e.g. "a stack of papers". If there is more than one stack then add the -s suffix, e.g. "stacks of books".

Sometimes the objects can be hollow (like bowls), so they can fit snugly inside one another. If the objects are not stackable, and most coffee cups with handles are not, then the word pile is appropriate. Notice in the OP's image, the cups appear to be stacked but they are not. In real life, if the same three cups were placed on top of each other the resulting pile would wobble and might collapse.

a pile of dirty dishes
2. behind one another
A line of objects, for instance the seats in a movie theatre, seen lengthwise would be called a row, a row of seats. In the OP's example, I would say that the glasses are seen in a line, in an Indian file ,or perhaps less controversially, a single file. In other words, the glasses are behind one another
3. one inside another
In picture 3, the smaller glass is inside the larger glass, but it is not nested comfortably. The yellow glass is stuck2., wedged or jammed inside the larger glass.
The famous matryoshka doll is also known as a Russian nesting doll, and Stacking doll
…is a set of wooden dolls of decreasing size placed one inside another.
