There are some options, but they will depend on your country of origin. If you come from a developing country, your options will be severely limited:
(1) being a visiting scholar sponsored by the Japanese government or your government
The Japanese Ministry of Eductation, Culture, Sports, Science and Technology (MEXT, Monbukagakusho) sponsors excellent graduate students and visiting scholars from all over the world via the MEXT Scholarship program. However, keep in mind that:
- places are allotted by country of origin, and usually the competition is fierce, especially for developing countries;
- depending on country of origin, visiting scholars might not be supported.
Your country might also have such governmental programs that may be able to sponsor you. Again, such programs are rather scarce in developing countries due to the scarcity of resources. However, if you come from a developed country in Western Europe, you may be able to apply for such a program and receive some sponsorship.
(2) enrolling in a Japanese language school
There are of course language institutions that offer (3-, 6-, 12-) month programs. You just need to find one. But of course they only offer instruction in the language, and the pace may not be suitable for you.
(3) enrolling as a "research", "auditing", or "credit-earning" student
This seems most appropriate for you.
Basically, you enroll at a university as a short-term student. You will be a full-time student of the said institution and will be eligible for a visa.
Let me explain the difference between the three very closely related categories:
A research student (kenkyu-sei 研究生) is a student/visiting researcher attached to a research group at a university, working under the supervision of a faculty member. Usually, they are international students who intend to join the said group as a graduate student, but they do not necessarily need to be so, as long as the faculty member agrees to sponsoring your admission.
An auditing student (choko-sei 聴講生) is a student auditing courses at a university, but not for credit. Research students are also permitted to audit courses, but auditing students do not need a faculty supervisor/sponsor, only the permission of the graduate school. However, not all university sponsor visas for auditing students, while almost all sponsor visas for research students.
A credit-earning student (kamoku-to rishu-sei 科目等履修生) is a student taking courses at a university for credit. Again, not all universities sponsor visas for such students.
As long as you can find a (host/faculty sponsor/supervisor), whatever you'd like to call, it would not be too hard to enroll in a Japanese university as a research student. Essentially, you hang out in a research group and partake in activities as agreed upon by your host and you. Maybe you help with the research, maybe you do a mini-project, and maybe you can just take some courses, etc. Keep in mind that most courses at Japanese universities are of course offered in Japanese.
There are usually "survival" Japanese courses offered for free by the host institution, so you can learn a bit of the language.
Visits under 90 days do not require a long-term visa, and may not require a visa at all if you come from a visa-exempt country. Longer stays require a "study" or "cultural activities" visa, which requires the sponsorship of an institute of higher study.
Also, have you considered a working holiday? It is not available to everyone (working holiday visas are only granted to citizens of select countries), but it is a way you could stay in the country for a while.