As is typical for a sonnet, the meter of "Ozymandias" is generally iambic pentameter, in which lines are ten syllables long with an alternating unstressed-stressed pattern. For instance, line 9 of the poem is perfect iambic pentameter:
And on the pedestal, these words appear:
However, the meter of the poem also has several moments of irregularity that it uses to create particular effects. For instance, in line 2, there is a slight spondee (stressed-stressed) on “two vast” that emphasizes the immensity of the statue’s legs:
Who said—“Two vast and trunkless legs of stone
Similarly, the third line begins not with the expected iamb but with a trochee (stressed-unstressed) before returning to iambs for the rest of the line:
Stand in the desert. . . . Near them, on the sand,
The trochee puts the stress on "stand," emphasizing the strange sight of these two legs (and nothing else) sticking up out of the flat desert.
In line 7, Shelley includes a caesura in the form of a comma, and then emphasizes the pause from the comma by changing the meter: “stamped on” is trochaic, not iambic.
Which yet survive, stamped on these lifeless things,
The caesura and break in the metrical pattern serve to emphasize the "stamp," which in turn highlights the way that the sculptor's artistic talent permanently captures the traits of Ozymandias such that they have endured through time when everything else that Ozymandias created has disappeared. (It also hints that Shelley believes that his own artistic talent, which is exemplified in his use of the caesura and changed meter, also can create an enduring work of art.)
In lines 10 and 11, the poem's play with meter gets a bit more extreme.
My name is Ozymandias, King of Kings;
Look on my Works, ye Mighty, and despair!
The best way to look at the meter of line 10 is probably to read the "dias" in Ozymandias as a single syllable (though of course it isn't). Doing so makes that line iambic pentameter in theory, but in practice the fact that "dias" truly is two syllables elongates the line in odd ways. The metrical oddities then continue in line 11, too, since “Look on” is trochaic, as is the foot made up of the "y" in "mighty" followed by the "and." Rather than being smooth, the meter of these lines is spiky. This spikiness, in the only lines of the poem that quote Ozymandias directly, makes them stand out against the more regular meter of the rest of the poem. This fits with Ozymandias's speech in two ways: first, it shows how Ozymandias saw himself as standing above and separate from the rest of the world. Second, though, it also echoes the way that only the legs of Ozymandias's statue now spike up from the otherwise flat, regular sands of the desert. Ozymandias may have stood out for a while, but nature and time have ground him back down.
Overall, throughout the poem, then, Shelley plays with, or breaks, the meter. In part, he does this to emphasize aspects of individuals lines. But it is also possible to argue that the shifting meter in the poem has a more general thematic purpose as well: that it makes the poem feel as “broken” as the statue, while at the same time showing Shelley's skill to be at least the equal of the sculptor.