In "Ozymandias," the speaker recalls meeting a traveller, presumably one who visited Egypt. The speaker of the poem tells what the traveller told him. The traveller found an ancient monument to Ozymandias, the Greek word for Egyptian King Ramses II. The monument is more of a ruin now, with just two legs sticking out of the sand and the broken, smirking face staring up, half buried in the sand. The king's pretentious inscription seems pathetic and vainglorious now that the monument is a ruin and nothing is there to support and memorialize his greatness but wreck of a monument and the empty desert.
Ramses II was a very successful Egyptian king with a long-lasting rule. He also had built more monuments to Gods and to himself than any other king. He even gave himself God-like status. Although quite successful, he was quite proud and self-important. Shelley's poem is a satire of this pride but it is also a meditation on mortality. It might be satisfying to the traveller that kings are no different than commoners: all are subjected to death the physical and memorial decay of time.
"Ozymandias" was written by Shelley as part of a contest with his friend and fellow poet Horace Smith. Both poems treated the same subject--the statue of Ramses II that was enroute to the British Museum. The monumental nature of the fragmentary statue and its original inscription were perfect symbols for poets operating in the orbit of The Examiner, a provocative political journal that was daringly critical of George III and the British Empire in general. It is significant that Shelley (and Smith) describe the statue as lying in a state of desolation in the sands of Egypt, while in fact the recoverable pieces had been collected (after a failed attempt by Napoleon) by the British in a showy demonstration of imperialism.