Doppler effect is change in the perceived or observed frequency as compared to the original frequency when the source, the observer or the medium is is in motion.We have to consider the effect of motion of the medium in case of waves that need a medium to propagate like sound.In case of light waves which do not need a medium to propagate we do not have to bother about the velocity of the medium, just the velocities of the source and the observer.
So, the observed frequency f` is related to the actual frequency fo by the following formula:

The choice of the positive and the negative signs depends on the convention followed, what is true irrespective of the convention followed is that the observed frequency is higher than the actual frequency when source and observer are approaching each other while the observed frequency is lower than the actual frequency when the source and the observer are moving away from each other.
Doppler effect was first observed for sound waves but it holds good for all kinds of electromagnetic waves, e.g., light waves.Though in case of light waves the Doppler effect is not observed in terms of frequency but in terms of colours.A the observed colour shift towards red if the source and the observer recede away while the observed colour moves towards blue if the source and observer move towards each other.
Following are the few cases which depict the Doppler effect when the source is moving while the observer is stationary:
1.When the source is stationary:

image source: paws.kettering.edu
The figure above displays the wavefronts propagating symmetrically in all directions when the source is stationary.These wavefronts travel with the speed of sound and the distance between two consecutive wavefronts is the wavelength.In this case, the observed frequency is same as that of the actual frequency.
2..When the source is moves with a velocity v (less than the velocity of sound).

2..When the source is moves with a velocity v (less than the velocity of sound).

image source: paws.kettering.edu
In this case the source is moving towards the right so the centre of each wavefront keeps on moving towards right.An observer standing in the direction of the motion of the source (towards right of the source) will observe a higher frequency than actual while an observer to the left of it will observer a lower frequency.

