I-shaped beams are very common. I did study them once but have forgotten a lot. I think the idea is to have a stripped down shape that would weigh a lot less than a solid steel beam whilst retaining most of the strength. The top and bottom bits are called flanges. These make it harder to flex the beam. Here it is stretching out under the load of the railway track. They help to stop it bowing in the middle. The web in the middle resists shear forces.