Before you go ahead and pack your bags and with sunscreen and beach balls, you have to familiarize yourself with the legalities of residing in Costa Rica. It is an independent nation, hence it has its own sets of rules about passports, visas, and the such.
To help you with that, here are some tips from Transition Abroad.