The Drake Equation

In 1961 an astronomer by the name of Frank Drake wrote an equation which, for the first time, described a way to estimate how many alien civilizations exist in our galaxy. This became known as the "Drake Equation" and looks like this:

N = R x fp x ne x fl x fi x fc x L

It's actually not as complicated as it looks. Here's what each of the components mean:

N The number of civilizations in our galaxy which are capable of communicating across interstellar distances. This is the number we are trying to figure out, and is a product of all the other values.
R The rate at which stars are born in our galaxy per year.
fp The fraction of these stars that have solar systems with planets.
ne The average number of "Earthlike" planets in a typical solar system (i.e. capable of sustaining life).
fl The fraction of Earthlike planets on which life actually forms.
fi The fraction of life-bearing planets where intelligence evolves.
fc The fraction of intelligent species that produce interstellar communications.
L The average lifetime of a communicating civilization in years.

Obviously we don't know the exact values of all these factors, but we do know enough to start making very rough guesses. As science progresses we will be able to pin down more values more accurately. Here's the current state of play:

R Rate of Star Formation.
We have a fairly good idea of how many stars are born in the Milky Way each year, and the current total is around 100 billion.
fp Solar systems with planets.
We have detected over 100 extra-solar planets, so we can at least use a safe minimum percentage for this value. It should be reasonably safe to assume that there are many more solar systems than the ones we can see with our crude telescopes. Common estimates range between 20% and 50%.
ne Number of "Earthlike" planets.
Until recently our best guess has been based on our own example - three or four potentially habitable planets or moons per solar system. One of the current big challenges in astronomy is to find Earthlike extra-solar planets - this is being tackled by many teams around the world and will get a boost with the next generation of space telescope. We should be able to make a much better estimate within twenty years.
fl Fraction of life-bearing planets.
This is where it gets difficult as we only have one known example. We can't extrapolate from this - we need to know about life on other planets (or moons). That's one reason it's so important to see if life ever existed on Mars or other places in our solar system - so we can make a better estimate of the "fl" value. (Note that there is one caveat - life within a single solar system could conceivably migrate between planets.)
fi Fraction of life-bearing planets where intelligence evolves.
For this value we need to come back to Earth and look at how we evolved. Were humans a fluke, or could other species have become as intelligent? Are other species already evolving to be as intelligent?
fc The fraction of intelligent species that produce interstellar communications.
By now we're deeply in the realm of speculation but let's keep going. Given that communication is a winning survival tactic, it makes sense to assume that intelligence is likely to be accompanied by a desire for better communication. Radio wasn't hard for humans to master and would seem to be a logical step in advancing communication for any technological species.
L The average lifetime of a communicating civilization.
Again, we're relying on a single example and lots of speculation. If we assume that even a small percentage of civilizations do not self-destruct early in their evolution, there's no reason a civilization couldn't be communicating for at least several hundred thousand years.

Dr. Frank Drake himself estimates around 10,000 potentially communicative civilizations in our Galaxy. You can try it yourself with this easy Drake Equation Calculator.

One thing to remember: This equation estimates the number of civilizations which we could potentially communicate with. It does not address the total number of civilizations, or those civilizations which have no desire to communicate with anyone else. Importantly, it is also limited to our galaxy (since other galaxies are too far away for any known means of communication). Any estimate using the Drake Equation should be multiplied billions of times to estimate the number of such civilizations in the whole Universe.