Before the mechanical lubricators that Hot discusses every locomotive had to have a method of oiling the valves and cylinders.
This took the form of what was called a "hydrostatic" lubricator, which was located in the cab of the engine. The early ones had three feeds, one to each valve chest and one to the air pump. It was filled with valve oil, and relied on a measured drip of water to force the oil (water is heavier, you know, and went to the bottom of the reservoir forcing the oil out the top) through the piping to the desired locations. Every so often the water would have to be drained out of the lubricator and it would be refilled with oil. This was attended to by the engine crew when on line of road. There was a glass for each feed showing the level of oil and water in the lubricator. The amount of oil to be delivered could be regulated by the admission of water to the lubricator.
Like a lot of the old things, it was a remarkably dependable way of doing the job, only being replaced by a mechanical device which held more oil and needed no attention on the road.
As air pumps got more modern, they were given their own lubricators.
EdKing