Alien Registration
All foreigners are required to register as "aliens" within 90 days of arrival in Japan. Also, a foreign citizen is required by Japanese Law (The Immigration Control and Refugee Recognition Act) to carry the credit card sized "Certificate of Alien Registration" at all times or be liable to penalties (ranging from a 'slap on the wrist' to deportation). The definition of carry "at all times" includes permanent residents wandering down to the corner store to pick up the milk. There are no exemptions. Carry your card at all times.
If you are on a 'Tanki-Taizai' (short stay/ tourist) visa of 3 months duration or less, you are required to carry your passport as an alternative form of identification. All other foreigners (including tourists on 6-month visas) are required to register and carry the Alien Registration Card.
Students usually receive assistance from their school for registration. To register you need to visit the nearest local government office (either the City or Town Hall, or Ward Office). You will require two passport sized photographs (take these with you), your passport, proof of residence (your school should provide this) and a fair amount of patience.
It is a good idea to do this soon after your arrival so that you don't forget or in case you find yourself inundated with homework/exams etc at the 90-day mark. The card records your name, date of birth, nationality, address in Japan, the name of the householder (yourself unless you are living in a homestay or other accommodation with a family) passport number, landing date, occupation in Japan, visa status, period of stay (the expiry date of the visa), renewal date and issuer (usually a proxy for the mayor or village head). If any item on the card changes (for example by extending your visa, changing job or moving house - even within the same city) then you are required to go back to the local government office and update your registration within two weeks of the event. It used to be necessary to be fingerprinted, but it is no longer so.
For details regarding visas, see the Visa Guide. If you are interested, these links take you to the Japanese Ministry of Justice homepage for the relevant law. [ENGLISH - JAPANESE]