After residing in Brazil continuously for 15 years, without any criminal record, foreigners may apply for Brazilian citizenship on that basis alone.However, this period can be drastically reduced. If the foreigner holds a permanent residence for Brazil, has sufficient knowledge of the Portuguese language (in speaking, reading and writing) and a job or sufficient funds to support himself and his family, the period can be cut down to 4 years.
This four-year period can be further reduced. If the resident has a Brazilian wife or child, he can apply for citizenship after one year. If he has certain professional, scientific or artistic abilities, he is eligible for Brazilian citizenship after two years. Three years of permanent residence entitles foreigners for a citizenship who own a property or business of a certain value.
The process of applying for a Brazilian citizenship is run by the Ministry of Justice (Ministério da Justiça). Before approving the application, the Ministry officials will first check a whole series of documents which you have to submit with your application, most relevant being the criminal record, the employment situation and the financial situation. Furthermore the applicant must not have any income tax debits and has to prove that he is in good mental and physical health (this only refers to applicants who apply for a citizenship after less than two years of permanent residence).
Note on dual citizenship
The Brazilian law allows dual citizenship. However, for holding two nationalities both countries involved (in this case Brazil and your home country) have to allow dual citizenships. For further information check the regulations of your home country.