You are probably more familiar with the Doppler effect as it applies to sound waves. When an object producing a sound is coming toward you, the pitch (frequency) of the sound will be higher, which corresponds to a higher frequency of the sound wave. Similarly, when an object producing a sound is moving away, the observed frequency is lower.
As this video illustrates, the sound has higher frequency when the object is coming toward you and frequency when it is moving away.
The faster the object is moving, the higher or lower the pitch will sound to you.
You would also hear a change in the pitch of the sound if you were moving toward or away from the car. If you are moving toward the object, you hear a higher pitched sound and you hear a lower pitch if you are moving away.
The Doppler effect is also present in light waves when there is relative motion between the source and observer, similar to the effect in sound waves.
The apparent brightness can be measured from Earth. If the luminosity of a star or a galaxy is known or can be estimated, it can be compared to the apparent brightness to give an estimate to the distance of that object.
Certain objects are very useful in this respect, if they are very bright and have known luminosities. These objects are known as "standard candles."
For example, if you have several lamps that have 100 Watt light bulbs, and place them at various distances away, the fact that you know they are shining at 100 Watts allows you to figure out how far away they are.
Type Ia supernovas are often used as standard candles. A type Ia supernova happens when a neutron star has a binary partner that is a red giant star. The red giant is very large and low density in its outer regions, so some of its matter is drawn away, onto the neutron star. The neutron star will accumulate matter until it starts to have fusion on its surface and flare up in a nova. This happens several times. When the neutron star accretes enough matter it reaches a critical mass, starts fusion in its core and explodes.
This critical mass is about the same for all neutron stars, so all of these supernova explosions have about the same luminosity. Since we know what this luminosity is, and because they are so bright that they can be seen very far away, we can use them to measure distances to faraway galaxies.
When there is some relative velocity between the source of light and an observer, it affects the frequency of the light seen by the observer. This is known as the Doppler effect. If the light source is moving toward the observer, in a sense, it is moving into its own signal, and the observed frequency increases.
If the source is moving away from the observer, the opposite is true, and the observed frequency decreases. Similar increase and decrease of the observed frequency occurs when the observer moves toward/away from the light source.