Several cars grind metal on the rails to clean and polish them. It goes very slow and railroad traffic has to be temporarily delayed. At the front and back cars are 2 large streams of water that put out possible fires started by the grinding. More info on these trains here: https://en.wikipedia.org/wiki/Railgrinder
Sorry about the terrible camera quality, this was 5+ years ago on a ring doorbell in the middle of the night.