"The Vanity of Human Wishes" is one ambitious poem. In it, the speaker surveys all of mankind, and examines the way in which all kinds of dreams and wishes and ambitions come to nothing.
The poem is loosely divided up into sections which deal with different kinds of power and ambition. There are sections that deal with political power, financial power, intellectual power, and even sexual power. The speaker's aim is to show how all of these kinds of power are pointless and don't bring us any satisfaction—good to know.
In order to convince us of his point of view, the speaker refers to various historical figures, citing their fates as examples of why the pursuit of wealth and power is ultimately futile. There's no point in running after money or status. They're not going to bring us happiness or peace. On the contrary: they'll only bring us lots of trouble.
The ultimate conclusion of the poem is that the only chance at a happy life we have is through God. It's only through our faith in God that we can hope to find peace and contentment. So we'd better pull out our prayer books and start praying.