
Bathing Machines near Chain Pier, c. 1890: Children paddling in the sea, watched by their families
from the beach. Two bathing machines at the water's edge.
From Alice’s Adventures in Wonderland, Chapter II, “Pool of Tears”:
(Alice had been to the seaside once in her life, and had come to the general conclusion that, wherever you go to on the English coast, you find a number of bathing-machines in the sea, some children digging in the sand with wooden spades, then a row of lodging-houses, and behind them a railway station.)
The bathing machine was a device, popular in the 18th and 19th centuries, for the purpose of allowing people to change out of their usual clothes, possibly change into swimwear and then wade in the ocean at beaches.
According to some sources (including Martin Gardner), the bathing machine was invented in 1750 by Benjamin Beale at Margate, Kent, England. Other sources say they did not come into common use until decades later. However, in Scarborough Public Library there is an engraving by John Setterington dated 1736 (directly below) which shows people bathing and appears to be the first evidence for bathing machines.

The bathing machine was part of sea-bathing etiquette more rigorously enforced upon women than men but to be observed by both sexes among those who wished to be "proper".
Especially in Britain, men and women were usually segregated, because it was considered “improper” for men and women to catch sight of each other in their bathing suits (although modest by modern standards).
The bathing machines in use at Margate, Kent, were described in 1805 as:
four-wheeled carriages, covered with canvas, and having at one end of them an umbrella of the same materials which is let down to the surface of the water, so that the bather descending from the machine by a few steps is concealed from the public view, whereby the most refined female is enabled to enjoy the advantages of the sea with the strictest delicacy.
The bathing machine was about 6 feet in length and width, and about 8 feet high, with a peaked roof. Some had solid wooden walls; others had canvas walls over a wooden frame. Sometimes the windowless box was colored with the fantastic lavishness of a canal-boat, and sometimes the whole of the superficial space was covered with advertisements. The bathing machine had a door behind and in front, and as the floor was four feet above the ground, it had to be reached by a step-ladder. The contents of the bathing machine consisted of a bench, a damp flannel gown, and two towels. The only light was from an unglazed opening in the roof; there was no mirror, and no fresh-water.
People entered the small room of the machine while it was on the beach, wearing their street clothing. In the machine they changed into their bathing suit, although, according to Wikipedia, men were allowed to bathe nude until the 1860s, placing their street clothes into a raised compartment where they would remain dry.
The machine would then be wheeled or slid into the water. The most common machines had large wide wheels and were propelled in and out of the surf by a horse or a pair of horses with a driver. Less common were machines pushed in and out of the water by human power. Some resorts had wooden rails into the water for the wheels to roll on; a few had bathing machines pulled in and out by cables propelled by a steam engine.
Once in the water, the occupants disembarked from the sea side down steps into the water. Many machines had doors front and back; those with only one door would be backed into the sea or need to be turned around. It was considered essential that the machine blocked any view of the bather from the shore. Some machines were equipped with a canvas tent lowered from the seaside door, sometimes capable of being lowered to the water, giving the bather greater privacy.

Mermaids at Brighton swim behind their bathing machines in this engraving by William Heath, c. 1829
Some resorts employed a "dipper", a strong person of the same sex who would assist the bather in and out of the sea. Some dippers were said to push bathers into the water, then yank them out, considered part of the experience.

Dippers
Bathing machines would often be equipped with a small flag which could be raised by the bather as a signal to the driver that they were ready to return to shore.

Southwold
Bathing machines were most common in the United Kingdom and parts of the British Empire with a British population, but were also used in France, Germany, the United States, Mexico, and other nations. Legal segregation of bathing areas in Britain ended in 1901, and the bathing machine declined rapidly. By the start of the 1920s bathing machines were almost extinct, even on beaches catering to an older clientele.

Beaches around the world

Painting by Eugene Boudin, 1862
Jane Austen on bathing in 1804 (from Jane Austen’s Letters, #39):
The Bathing was so delightful this morning & Molly so pressing with me to enjoy myself that I believe I staid in rather too long, as since the middle of the day I have felt unreasonably tired. I shall be more careful another time, & shall not bathe tomorrow, as I had before intended.
Late Victorian Swimwear:

Girls bathing c.1910s:

Click on this thumbnail of Portobello Beach, Scotland, 1905:

Sources:
FASHION-ERA
iknow Yorkshire
jasa.net
Shellbelle’s Tiki Hut
Victoriana.com
Wikipedia