You must apply for the required visa at the German Embassy or Consulate General in your home country. There you will also be informed about the documents you need for a language visa. Depending on your country of origin, you may need to set up a blocked bank account to show that you are financially secure for any situation in Germany. Proof of health insurance and accommodation are also required for a visa application.
The language learning visa is only valid for participation in a German course. It is not possible to change the purpose of stay of the visa. The maximum duration of stay with such a language learning visa is twelve months. After the completion of the German course, you have to leave Germany again, and so additional proof of your willingness to return to your home country is also necessary.
You should allow several weeks for your visa application to be processed. Depending on the embassy, consulate general and home country, the processing could also take two to four months. It is therefore necessary to apply for a visa as early as possible so that the issuing date corresponds with your travel and study plans.