The huge volume of people migrating to cities has caused many problems.
New arrivals to the city build their own houses out of basic materials such as tarpaulin, corrugated sheets and broken bricks, on land which they neither own nor rent.
These areas are illegal and are not catered for by the Government, so there is no electricity, rubbish collection, schools or hospitals. The houses in these settlements have no basic amenities such as running water or toilets, so diseases like cholera and dysentery are common.
Overcrowding is a major problem in Rio's favelas. On average, the population density is about 37,000 people per square kilometre. Because of the lack of toilets and poor sanitation, sewage often runs in open drains. This causes diseases which spread rapidly.
People are poor and cannot afford healthcare or medicines so illnesses go untreated. Diseases spread quickly. As a result, infant mortality rates are high and life expectancy is low (on average 56 years) in a Rio favela.
There are not enough jobs to go around, so unemployment rates are high. Most people who do have a job work in the informal sector for 'cash in hand', eg labourers or cleaners. Informal sector jobs are very poorly paid and the work is irregular so a steady income is not guaranteed.
Crime rate in the favelas is extremely high as they are controlled by gangs who are involved in organised crime. Rocinha is so feared by police that they do not patrol on foot without guns.
Rio is hemmed in by mountains, so during tropical stormslandslides are common. Make-shift houses in favelas offer little protection to people and houses are easily washed away by the heavy rain and mud.
The Brazilian Government has realised that it cannot solve the housing problem in city favelas like Rio by destroying them. The government wants to improve existing shanty towns but does not want to encourage more to develop. The favelas are eyesores and portray a poor image of the city.
These are small scale projects which allow local people to use their skills to help improve their local area. The government has provided materials such as bricks, cement and glass to enable residents to improve their own homes. This often fosters a community spirit as many families work together to make the improvements.
In Rocinha, self-help schemes have improved the area from slums to low quality housing where the majority of homes have basic services like electricity. There are now also many services in Rocinha including cafes and shops. Some people have been granted legal ownership of the land on which their houses are built.
These are projects undertaken by the local authority to relocate residents from favelas. Brick houses are built with electricity, running water and sanitation pipes.
People may be allowed to buy these houses. An example of such a scheme is 'The Favela Bairro Project' or 'Slum to Neighbourhood' project. Services in these areas also include refuse collection, schools and health centres.
Charities help to improve life for people in shanty towns by providing money for self-help schemes. The Developing Minds Foundation builds schools and supports education programmes in Rio's favelas. Their aim is to improve the literacy rates of children so they can get a good job, improve their standard of living and have more life choices.