What? When light is refracted, frequency stays constant and wavelength change. Are we talking about two different things here?
When light is refracted in a medium its speed changes-and its wavelength changes but thats only because the energy that it came with is the same-refraction does not affect the energy of the wave. Since energy of the wave is directly related to frequency, and since the material (causing refraction) does not change energy, the frequency is the same.
So you are correct...
However, OP asked how to change frequency of EM wave....the frequency of the radiation or EM emitted by an object is equal to c/lambda where c is speed of the EM (light).
In general, one can accomplish this by changing the wavelength or the speed of light. But the change has to be made AT THE SOURCE of the EM radiation. a black body radiation emits a specific amount of energy at specific frequencies. Changing the speed of this emitted frequency AFTER it has been emitted (such as in a refraction) will only change its wavelength. However, changing the energy of the source will change the frequency. Also changing the wavelength at the source (electrons jumping to a different orbital for example) will have a different frequency emission.
That is why different colors are emitted by a burning flame etc-the electrons are jumping at different orbitals and releasing energy at different frequencies with different wavelengths since colors are observed at different wavelengths...
However, another poster mentioned that based on doppler effect, frequency can change. However, this change in frequency is different from the change in frequency due to wavelength change.
A doppler effect is a PERCEIVED change in frequency because the source is moving towards or away from the observer. Thus the observer gets a different frequency (relative change in frequency) from that emmitted by the source. But the source frequency is NOT changing. The only way to change the source frequency (absolute change in frequency) would be to change the emitted wavelength or the speed of light...