A guarantor is generally required when renting a house or apartment in Japan. If this is the case, you will need to apply to a private guarantee company.
Guarantee companies require that you come up with emergency contacts. One should be one of your parents/relatives in your home country, and the other person one of your friends living in Japan.
Conditions vary between guarantee companies, so please ask the agency helping you with your apartment hunting. Also, please note that university personnel and teachers cannot be your emergency contact person or guarantor.