The irony in Ozymandias pivots on these lines: "My name is Ozymandias, king of kings: Look on my work, ye Mighty, and despair!" Ozymandias, once a powerful Egyptian tyrant, had a huge statue built of himself and inscribed it with those lines. Ironically, the statue is now broken and scattered, and the once mighty kingdom is an empty, barren desert. While Ozymandias meant people, especially powerful people, to tremble before his enormous statue with the "sneer of cold command" on its "visage" (face), and to be frightened by his immense city and powerful army (his "works"), he now has nothing. He is nothing.
The irony is that instead of trembling and despairing at his power, the mighty should now tremble and despair at Ozymandias's loss of power, because this too will happen to them. Rulers may think they are safe and secure, but in reality they will be broken. Ozymandias meant his words to mean one thing: as is always the case with irony, they ended up to mean something different from what he intended.