To those who don’t work with either these two may seem like very similar versions of the same thing.
H sections are designed to take axial forces, as columns or piles (that is underground columns). While I sections are designed to be beams, bending in a single direction.
H sections have a thicker web because the web is more likely to buckle under axial compression than under flexure. H sections also have thicker flanges as they too may buckle under axial compression. H sections tend to be very square, their width is similar to their height.
I sections are usually deeper than they are wide. Their webs are much more slender than the H sections, because the web is less likely to buckle when loaded in flexure.
Summary: steel I beam’s cross section can bear direct pressure and good resistance to pull, but the the flange of cross-sectional dimensions is so narrow that it is not torsional. H-beam is opposite, so both of them have their pros and cons.