The term Third World has its roots in France. During the Middle Ages, France (and many other medieval European powers) established a social order which broadly grouped the populace into three classes known as Estates of the Realm. The First Estate comprised the religious clergy while the Second Estate covered the nobility. The Third Estate covered the rest - the "commoners" - who tended to be subject to heavy taxes towards the other Estates. Even though the Third Estate was made up of people from disparate walks of life, the financial and social oppression that they were subjected to bonded them together in unity against the First and Second Estates. This discontent ultimately led to the French Revolution.
The end of the Second World War led to a general split of those involved into two factions - capitalist and communist - and triggered the Cold War. However, there were a number of countries in the rest of the world - largely consisting young post-colonial nations in Asia, Africa, South and Central America - which were not aligned with either faction. In 1952, French historian Alfred Sauvy, in an article published in the L'Observateur, drew a correlation between the political position of the non-aligned and economically underdeveloped bloc and the historical French Third Estate. He dubbed them Tiers Monde (Third World) and it naturally followed that the NATO-led capitalist bloc was referred to as First world and the Soviet-led communist bloc as Second World.
In his article, Sauvy paraphrased an excerpt from a pamphlet that Emmanuel-Joseph Sieyès published in 1789:
...car enfin, ce Tiers Monde ignoré, exploité, méprisé comme le Tiers Etat, veut lui aussi, être quelque chose
which translates to:
...because at the end this ignored, exploited, scorned Third World like the Third Estate, wants to become something too
The Sieyès pamphlet became the manifesto of the French Revolution.