While it's a Portuguese word that has been attached to crime and poverty, these informal working-class shantytowns are seeing a resurgence as well. Here's what to know about them:
1. The popularity of the word 'favela' has its roots in wartime.
Brazilian author Euclides da Cunha once described a "mount Favela" in his book about Brazil's civil war of 1897. Soldiers had camped on a hill where the thorny favela plant grows in the northeast region and made temporary housing out of shacks.
When some of the soldiers returned to Rio, they settled on forested hillsides that ringed the city, waiting to be granted land that they were promised by the government. Their makeshift living conditions again were a reminder of the "favela" hills. The term eventually stuck.
2. Favelas grew because of migration into the city.
After Brazil abolished slavery in the late 1800s, former African slaves gathered in settlements in Rio, the then-capital, creating these cities within the city. While black Brazilians over the years felt pushed out of the downtown, migrants started coming into Rio looking for work in the 1930s and '40s.
They couldn't afford proper housing, and sought refuge in the slapdash dwellings that the government considered illegal.
Many of the areas lacked sanitation and failed to follow building codes.
The government moved in to force the migrants out and into more adequate housing in "proletarian parks," but the initiative failed to eradicate the settlements. During the 1960s, the government again tried to wipe out the favelas, particularly ones near popular tourist destinations. While some of them were eliminated, others only expanded after displaced people moved in.
3. Favelas have become synonymous with slum life.
Today, there are an estimated 1,000 favelas in Rio, and they are home to about 1.5 million people, or close to 24 percent of the city's population, according to the Catalytic Communities, an advocacy NGO.
The favelas are diverse — some have rudimentary infrastructure, while others have homes hooked up to electricity with phones and computers.
"Most favelas lack effective sewage systems, access to potable water and waste management systems," according to the advocacy group The Borgen Project. "The communities have become so densely built up, that modern roads and utilities are nearly impossible to install."
With so many people living in packed and illegal tenements, the communities have become a hotbed for crime and drugs. Many are ruled by drug lords who traffic cocaine and encourage gang violence. The government, however, has embedded military police units to help crack down on illegal activity.
4. Favelas have been featured in films and drawn prominent visitors.
The Oscar-nominated 2002 film, "City of God," brought the ramshackle conditions of favelas to a wider audience. The film takes place in Rio's Cidade de Deus favela — the same community that President Barack Obama visited in 2011.
Two years later, Pope Francis visited the Varginha favela, telling residents of the majority Catholic nation that "you are not alone." (Varginha is known locally as the "Gaza Strip" for the violence caused by rival drug gangs.)
Celebrities such as Will Smith, Kanye West and Kim Kardashian have also been photographed in Rio's favelas.
5. In a twist, some favelas are being used to boost tourism.
While the beaches and festivals are what often beckon visitors, the communities that have sprouted on the hillsides are also popular images associated with Rio. But instead of shooing outsiders away from these poorer fringes, government officials in recent years have encouraged trips there.