I have no idea how he got on top of the train, but I think he was trying to get a free ride. Then it looks like he touched the third rail, and that gave him some shock, but he couldn't shake it, and must have been confused. Then he touched it again. Zap! Turkey Fried!