Brazil, the continental giant, abandoned the railway as a means of transporting people many decades ago. In spite of being an ideal means of transportation for such a large country, the authorities made a political choice and opted for the roads and the car.
The website of the Agencia Nacional de Transportes Terrestres has a list of all the passenger trains in Brazil. Basically, there are two important lines, the one linking Belo Horizonte (Minas Gerais) to Vitoria (Espírito Santo) and the one linking São Luís (Maranhão) to Paraupebas (Pará). Then there’s a shorter line, from Curitiba to Paranaguá, in the state of Paraná [company’s website].
On the same page you will find a listing of all the tourist trains (30 of them) operating in Brazil.
The website of the Associação Brasileira dos Trens Turísticos (in Portuguese only) is also full of useful information.