The trains of cog, or rack, railroads, however, can scale steep slopes using a special toothed rail, known as a rack, in the middle of the track. The train has a cog that meshes with the toothed rail. As the cog turns, it hauls the train slowly up the slope.