"the steam locomotives there had some valves located on the bottom of their cylinders.
What do they do ...."
Those are the cylinder cocks, and are used to drain condensate from the cylinders on startup since water is incompressable and would cause damage.