This is a U.S. Navy locomotive with two engineers servicing the piers of Naval Operating Base Norfolk (now called Naval Station Norfolk) in 1943. The engine itself is a 0-4-0 "saddle tank" engine that was a mainstay of railroad switch yards across the country. The saddle tank is the square box, on the side of the engine where the words "Naval Operating Base" is written, and held water for the boilers. It was a popular design for smaller engines used for yard switching. The engine did not need to pull a separate tender behind it and allowing it to be more nimble in operations.
Thousands of tons of supplies were brought to the base by rail. Base employees off loaded the trains and stored the supplies in some of the largest warehouses in the world before transferring them to ships. Norfolk, at the time, was served by three major railroads: Norfolk & Western, Virginian, and the Chesapeake & Ohio.