The main idea of this poem is that all tyrants are eventually defeated and reduced to nothing. Although Ozymandias thought he was a great and terrifying monarch, ruling over a mighty kingdom, all that is left of him now is a broken statue on an empty desert where his "works" once flourished.
Ozymandias had the following inscription put on his statue:
My name is Ozymandias, King of Kings;
Look on my Works, ye Mighty, and despair!
The inscription is ironic; while Ozymandias means for other rulers to be frightened of his displays of power, what now would frighten them would be the complete and utter destruction of Ozymandias's power and glory.
Shelley was a radical. He was a supporter of the French Revolution. Shelley is making the point that no king is all-powerful, no matter what he may think.