Compositions that offer illusions of perspective are created through ideas of line and form.
Perspective is the art of recreating depth in a plane. In the Renaissance, the ideas of line and form were studied, and many artists started to apply these ideas in their work.
Using lines that go from the point where the observer is to the objects in a conical perspective, the illusion of depth can be achieved. Some famous works that apply perspective are "The ideal City" from Piero della Francesca and "Las Meninas" from Velazquez.
Have a nice day!