In Brazil, without a CPF number you are nothing, you do not exist. You will be asked for it for anything!
Anyhow, now I have one I will tell you how to get one too. it's actually very easy! Only 2 steps!
Step one: Get your passport and some bill that hold your current address. This bill DOES NOT need to have your name on it! Without a CPF number you probably won't have any bills at your name anyway! So it does not matter that this proof of address carry "Mickey Mouse" name!
Anyhow, with those 2 things go to the post office. Tell them you come to pay the CPF tax. They may ask you if you live at the address of the said Bill! Say yes.
Pay the tax (about 5.60 reais) and get the piece of paper that the Post Office Girl will give you and go home.
Wait for a couple of days!
Step 2: Go to the Receita Federal building. Post Office Girl would have told you the nearest address. If not ask her or Google it! Bring your passport and the piece of paper given by Post Office Girl.
Get there early morning as not to queue for hours!
Tell the security bloke at the entrance you come for the CPF number. He will point you to a desk where you pick up a number. Wait for your number to be called. Hand over your passport, the CPF document given to you by Post Office Girl when asked and smile. After 10 minutes of imputing stuff in the computer, the personne there will give you a print. Keep it. Congratulation, you now have some sort of official existance in Brazil and can even join a Gym! Lucky you! :)