Siam was a country in Southeast Asia; it is now called Thailand.
By the time the name was officially changed in 1939, the borders of the country had been secured, and they have not changed since, except for a brief period during the World War II Japanese occupation of Thailand, when other parts of Japanese-occupied Southeast Asia were transferred to Thailand and briefly swelled the kingdom. Thailand was punished for its bad choice of ally after the war was over, and the borders were returned to their previous locations.
But such changes are not uncommon in this little corner of Asia; throughout its long history, Siam has been much larger, and much smaller, than it is today.
The mapping of the borders of the country did not in fact occur until the nineteenth century. Previously Siam, like most Southeast Asian polities, was home to a host of waxing and waning kingdoms whose fortunes depended, in large part, on the strategic and tactical prowess of their rulers.
Commonly, a powerful ruler was able to gain the allegiance of neighbouring polities by force, charm, or strategic alliance, thereby expanding the borders of his kingdom and contracting those of his rivals. Within the orbit of any powerful ruler would be a number of regional powers whose fortunes depended on their position. Nearby powers would be held under tight rein; one of the king's brothers might be sent out to rule (men from polygamous families have lots of brothers), and the populace would be required to supply a large amount of tribute to the central kingdom in the form of manpower and goods.
More distant powers would enjoy looser ties to the centre; they might even be allowed to retain a local ruler, and they would be required to send smaller amounts of tribute and perhaps a royal daughter or son to reside in the capital. In return, the nearby centres enjoyed greater security and peace, while the distant ones more easily fell prey to aggressive neighbouring kingdoms.
This type of political organization has been called a galactic polity, building on the analogy of a galaxy, whereby those planets in a solar system closest to the sun enjoy the greatest warmth and ties to the centre, while the farflung worlds are left cold and vulnerable to being draw into the orbit of a suddenly more powerful neighbouring star.
It is common in Thai nationalist historiography to trace the origins of the Siamese (and Thai) state back to a kingdom centred around the city of Sukhothai and ruled by the benevolent patriarch Ramkhamhaeng, one of those powerful rulers who was able to subjugate many of his neighbours and greatly expand his territory. However, during Ramkhamhaeng's day and after a powerful kingdom co-existed close by, centred around present-day Chiang Mai, which was founded by Ramkhamhaeng's friend and rival, Mangrai; other nearby powers included Phrae and Luang Phrabang. There were southern kingdoms near what is now Malaysia, and the Burmese and Khmer - now Cambodians - have long been major players in this arena. But all are given short shrift in the drive to identify a unitary lineage which leads to modern Thailand. That lineage moves from Sukhothai to Ayuthaya, and thence to Thonburi and Bangkok. That, at least, is the historiographic fiction.
By the nineteenth century European powers were busy colonizing Asia and the king, Chulalongkorn, realized that he better make formal what had previously been rather elastic, so he arranged for some intrepid farang (western) and Thai explorers to map the borders of the kingdom. Chulalongkorn's father Mongkut had already had to cede some Siamese territory to the British, and Chulalongkorn gave away much more to the French. But this was negotiated in return for concessions, not seized or tricked away from the Siamese, and the most important concession Siam was able to demand was independence. Thus the modern kingdom of Siam literally took shape in the nineteenth century, and Siam stood alone in Southeast Asia in being able to avoid colonization.
The term Siam itself has been in use for a very long time in Asia.
Apparently a twelfth-century Khmer inscription at Angkor Wat mentions syam, "dark brown people", said to be vassals of the Khmer king; they were probably settled around Sukhothai. The term quickly took hold in Europe as well, and farang visitors who visited Ayuthaya in the seventeenth century referred to the kingdom as Siam (or Sayam), but also Ayuthaya (Ayutthaya, Ayuthiya, and lots of other variants), and reported that the inhabitants themselves called their country Meuang Thai, "Land of the Free". This was the convention drawn on when changing the name from Siam to Thailand.
The name change was controversial, and some, like social critic Sulak Sivaraksa, still prefer Siam. For my part, I can see how "Land of the Free" has better connotations than "dark brown people". Also, the name Thailand, though an English translation, does have clear indigenous roots that the term Siam lacks. In any case, Siam became Thailand, and there the matter rests today.
I have noded Thai history extensively on everything, and this exposition culls many ideas from those other write-ups. If you're interested in knowing more, follow some of the hardlinks above, or go to Thailand, where I've created a meta-list of links on things Thai.