All foreigners staying in Brazil for more than 90 days must register with the Federal Police in Brazil. You can do this at any Federal Police Department Station within 30 days from the date you entered the country. The official steps are here at the Brazil Federal Police website, but I will break it down for you below since the website is entirely in Portuguese*.
*Copyright © 2019 Visa Hunter. All Rights Reserved.