Specific student housing options will vary depending on your university, so you should check with the university after you are admitted to get a sense for the most popular ones.
Living in university dormitories has distinct advantages, such as (relatively) low cost, convenient location and other young people. However, some students may dislike dormitory accommodations such as shared rooms, and others may simply rather live alone. These students have the option to rent apartments in the city just like anyone else, though the rent will be expensive and they may end up living far from campus.
For students studying for a brief period of time in a language or similar program, gaijin houses may be a good option. Those who feel they can integrate with a Japanese family may prefer to try and find a host family – this can usually be arranged through your university. An easy-to-use search engine for student housing all over Japan is available at Japan Accommodation for Students, though searches in large cities produce better results.
Boardinghouses are older, smaller apartment buildings that can usually be found right near universities. They do not offer much more than sleeping space and a toilet (to bathe and do laundry you can visit a nearby public bath, or sento), but there is usually a shared kitchen and the rent is much cheaper than that of larger apartments. Boardinghouse living conditions may seem harsh at first, but their low cost is a significant advantage and they are certainly liveable after some adjustment.
Subsidized student housing in Japan
In addition to low-income and employee housing, the Japanese government does offer some subsidized student housing. The demand for this housing is enormous, however, and after applying you will have to secure an apartment through a lottery. You have a better chance of getting a subsidized room if you are are studying in a small city.