For the sake of clarity I shall present here two devices which have been used to explain how an eternal God can be said to be the cause of a co-eternal world.
First, Norman Kretzmann’s The Metaphysics of Theism (Oxford University Press, Oxford, 1997, pp. 108-109) reports the following: The role of a timeless God holding an eternal universe in being is sometimes illustrated schematically in the following way.
The diagram denotes a sequence of events with the letter ‘E.’ Stretching back in time, each event is causally dependent on the preceding one. Thus event E(-1) is caused by event E(-2), which in turn is caused by event E(-3) and so on.
The letter ‘L’ expresses the fact that one event causes the next through the operation of the laws of physics, ‘L.’ And the concept of a causal God is illustrated by placing God – denoted with the letter ‘G’ – above the chain, sustaining it at every link.
Another way of visualizing the plausible conception of the co-eternity of God and the world is the image of the footprint in the dust. If the foot is eternal, and the dust on which it is imprinted existed also from eternity, the footprint will likewise be eternal.
In Summa Contra Gentiles (I, 43) Aquinas puts it this way. Philosophers “confess that God is the cause of the world, saying that the eternal God exists as the cause of an everlasting world in the same way as foot would have been the eternal cause of a footprint if it had been impressed on sand from all eternity.”
In De Aeternitate Mundi Aquinas attributes to Saint Augustine this remark: "The Platonists say: Imagine a foot that has been in dust since eternity. A footprint has always been beneath it, and nobody would doubt that the footprint was made by the pressure of the foot. Though neither is prior in time to the other, yet one is made by the other."
And in Summa Theologiae (I, 46, 2 ad 1) Aquinas says that some philosophers explain the co-eternity of God and the world with this image: "If the foot were always in the dust from eternity, there would always be a footprint which without doubt was caused by him who trod on it."