It all depends on what kind of wave, and what kind of medium.
For mechanical waves, like sound and earthquakes, the speed
is determined by the mechanical properties of the medium, like
density and stiffness.
For electromagnetic waves, like radio and light, the speed is
determined by the electrical properties of the medium, like
magnetic permeability and electrostatic permittivity.
That's a big part of the reason why sound and light travel
at different speeds through air, water, and jello.