THE IMPORTANCE OF VALID HEALTH INSURANCE
For those wishing to study in Germany, German health insurance, or recognised health insurance from your own (or another) country, is a requirement. Proof of insurance is presented at the time of enrolment and is also required in order to apply for a residence permit. Ideally, you should have your health insurance affairs in order before making the trip to Germany.
First, you need to check if your current health insurance is valid in Germany.
HEALTH INSURANCE POLICIES THAT ARE VALID IN GERMANY
Public health insurance plans from certain European countries are also valid in Germany. These include all the countries of the European Union plus Bosnia-Herzegovina, Iceland, Israel, Liechtenstein, Morocco, Macedonia, Montenegro, Norway, Switzerland, Serbia, Tunisia and Turkey. Each country has a reciprocal insurance agreement with Germany, and by using your European Health Insurance Card (EHIC), you can have full access to any required medical treatment in Germany, with all costs covered.

Private, domestic and foreign health insurance policies may also be valid in Germany, and this is something that you need to check with your provider before making the trip. If it's recognised, you will be exempt from public health insurance at enrolment time. You do need, however, to prove that you have valid health insurance. The best way to do this is to have a German iInsurance provider issue a letter confirming that you are adequately insured. The university's International Office can help in advising about which German insurer to contact.
One thing to keep in mind is that receipt of this letter of confirmation means it will no longer be possible to register for Germany's public health insurance for the duration of your stay in Germany.
UNRECOGNISED INSURANCE
In the event of your own locally-issued policy not being recognised in Germany, the only option is to apply for coverage with a German insurer. German public health coverage costs from around 80 euros per month. After having completed your 4th semester at university, or on reaching the age 30 (whichever is sooner), the cost rises steeply to at least 160 euros per month.
In summary, it's important to check whether any home-issued existing policy will be acceptable and valid in Germany. If not, you should purchase a local German health insurance policy on arrival in Germany, as proof of insurance is a requirement of your university's enrolment process as well as being a requirement of your residence permit application. Your own insurance provider (if you have one) or your chosen university's International Office will be able to offer advice.