Because the different levels in the ionosphere are electrically conducting, they interact with electromagnetic radio waves bending them in much the same manner that glass or water bends light. The refractive index of a layer in the ionosphere depends on its electron density and has an effect on waves according to their wavelength. As a wave passes up from below into such layers they get refracted, or bent back down towards the lower electron density layers. The amount of bending depends on the incident angle and the frequency of the wave.
Higher frequencies are less affected.
Finally, in passing through conducting layers, energy in the wave vibrates the electrons thus transfering some energy into the layer and being partially absorbed in the process. For much of the radio spectrum the frequencies are simply too high to be refracted back to the earth given the range electron densities which exist and propagation angles required. This is not true in the HF band of frequencies between a few hundred hertz and about 30 megahertz. There a delicate balance exists where, depending on the natural variations in density of the ionsphere, radio waves may be either refracted back to the earth or passed out into space. For the case of vertical incidence and a given ionospheric density there is a critical frequency above which no reflection will be received.