You could first read the bottom of:
In summary, Maxwell proposed a wave theory of light that models light as a transverse electromagnetic wave, or, as he put it: "light consists in the traverse undulations of the same medium which is the cause of electric and magnetic phenomena". The propagation speed was assumed to be a medium constant c, which is contained in the Maxwell equations*.
Maxwell and others thought that it should be possible to detect our speed relative to that medium, just as one should be able to detect for example the speed relative to air by experiments with sound. However, such experiments did not work. Instead it appeared that the same laws of optics are valid in every inertial reference system, and that was very puzzling. How can Maxwell's theory be valid relative to any inertial reference system?
Next you could read Einstein's summary of the problem here:
*Due to a change of unit system that is less obvious today; see for details the bottom of: