What does "Habemus Papam" mean? I'm seeing this phrase being displayed on all the news channels, in conjunction with a lot of cheering people under umbrellas who have been waiting for the new pope to be elected. Is there some sort of background and history that explains why this obscure latin phrase is being used?

What is the meaning of the phrase "Habemus Papam"?
It means "We Have a Pope!"

Usually the media declares this as soon as it sees white smoke, but the proper announcement is actually given by the Cardinal Protodeacon a short time later. Here is the English text of the full announcement, from the recent election of Pope Francis:


  I announce to you a great joy: We have a pope!
  The most eminent and most reverend lord, Lord Jorge, Cardinal of the Holy Roman Church, Bergoglio, who has taken for himself the name Francis.


From Wikipedia:


  Habemus Papam! ("We Have a Pope!") is the announcement given in Latin by the Cardinal Protodeacon, the senior Cardinal Deacon, upon the election of a new pope. The announcement is given from the central balcony of St. Peter's Basilica in the Vatican. After the announcement, the new pope is presented to the people and he gives his first Urbi et Orbi blessing.


The practice of giving this announcement actually goes back to the election of Martin V in 1417. At that time, several people had claim to the papacy, so when this was resolved with the election of Martin V, there was great joy, since the people finally had a pope. From New Short History of the Catholic Church, quoted on news.va:


  Pope Gregory XII, of the Roman line, was persuaded to resign in July. John XXIII also abdicated, under pressure. Benedict XIII, of the Avignon line, adamantly refused to resign and was eventually deposed by the council. Thereby the path was cleared for a fresh election and in November 1417 Oddo Colonna was duly elected by the council and took the name Martin V.


The announcement looked like this: