Hua Hin has a long history that predates its current name. In 1834, neighbouring Petchaburi province was hit by a severe drought and a group of farmers moved south and arrived at a village that had a white, sandy beach and some rocks.
They settled and named the village Samor Riang, which means "row of anchors", after the fishing boats anchored off the beach, or "row of rocks" depending on which translation you take.
In 1921, the Director of the State Railway, Prince Purachatra built The Railway Hotel (now The Sofitel Central) and this, not surprisingly, coincided with the construction of railway line from Bangkok down south. Royal Hua Hin Golf Course was designed by a Scottish railway engineer during this era as well.