The Doppler effect is by definition an apparent shift in the observed frequency of a wave, due to relative motion between the source and the observer.
When sound is emitted from a source, it sends waves through the medium it is produced in; generally speaking this medium is simply the air around us. The speed at which sound does this is 334 metres per second on average, or 1200km/h. This can vary depending on air pressure, temperature and humidity. However, sound waves are not only restricted to air. They can also exist underwater, with sonar being the best example, where they are again dependent of water pressure and temperature1.
Sound waves consist of zones where air or matter is compressed, alternating with zones of lower pressure. When one looks along the path of propagation, these zones form a regular pattern like waves in a pool. The distance between any two neighbouring areas of maximum pressure, or wave crests, is constant and is known as the wavelength. If you sit and listen to a sound then the maximal and minimal waves reach your ears at a constant rate, say 440 per second for a basic 'C' note. This rate is the sound's pitch, or frequency.
Now if you were to move closer to the source then you would encounter the next maximum/minimum series at an earlier time and so on for all the other series. Thus, you get exposed to more pressure variations per second, which equates to the perception of a higher pitch. Conversely, if you move away from the source then you experience fewer pressure variations per second and the frequency heard in your ears is lower than if you were sitting in your chair. In technical terms, this frequency change is referred to as the 'Doppler Shift', named after the man who discovered it: Christian Andreas Doppler, an Austrian mathematician
The same reasoning also applies when the source is moving about and not the observer. The driver in an ambulance doesn't change their distance to the sirens and thus gets to hear an unshifted signal. Sound emanating from the moving ambulance propagates with the same speed as before, but every new wave is created at a position closer to an observer standing ahead of the car. Thus, the distance between the wave's crests, the wavelength, is shorter and again, more pressure variations per second enter the observer's ears. Conversely, if the ambulance moves away then new waves are created at positions further apart from each other and the Doppler shift is negative, ie, you hear a lower pitched signal.
Thus, an ambulance passing by is heard as something going 'eeeeeeaauuuuuu', where the 'eee' part is the positive Doppler shift in the approach phase, the 'aa' part is the short unshifted time when the ambulance is close to your feet and moving aslant, and the 'uuu' part is caused by the negative Doppler shift when the vehicle is receding.
The Doppler effect is not restricted to sound as it has also been observed to happen with electromagnetic radiation, the most famous one being light.
We know that the spiral arms of our galaxy move around the centre of our galaxy in 250 million years so we can conclude that stars also move around the galactic centre. But not all stars move at the same speed, which gives the impression that stars move away or towards each other.
To explain further: take two cars, one moving at 100km/h and one moving at 50km/h on the same road in the same direction. If you are sitting in the first car and looking out the back window, it will seem as if the second car is moving away from you. This is of course not true - you are moving away from the second car faster than the second car can catch up with you - the first car moves away from the second car at a speed of 50km/h (as 100km/h - 50km/h = 50km/h).
The same happens with stars, only there the speed at which they travel is a lot faster, and it is this difference in speed that causes the change in the spectrum of the stars.
If the relative motion of the star is away from us then this will cause the interval between the arrival of the different waves to lengthen, moving the light towards the red end of the spectrum, which is known as 'redshift.'. If the relative motion of a star is towards us then the interval will shorten, resulting in a shift to the blue end of the spectrum, which is known as 'blue shift'.
Using this method, scientists have deducted the continuing expansion of the universe.
For more information on this, see the Edited Entry entitled The Doppler Effect in Reference to Stars.
The Doppler effect is mainly used to measure velocities very effectively. For instance, the devices that can measure the speed at which you drive a car, steer a boat, or pedal a bicycle, are based on the Doppler effect - they are called Doppler radars. They send out radar waves that are reflected off the vehicle in question and then back to the radar. These devices then measure the change in frequency and calculate the speed at which you were driving, steering or pedalling. So these devices and Mr Doppler's discovery are very helpful to the police if one were to 'speed' as they can then give one a (usually) hefty fine or speeding ticket.