If you are planning to study in Switzerland you are obliged to have health insurance. You have the freedom to choose authorized insurance company and students residing in Switzerland more than three months must be covered by health insurance. In case you miss three months deadline you will be assigned a health insurance plan by the authorities which can be rather expensive.
Every person living in Switzerland is required to take out compulsory basic health insurance according to the law (LAMal/KVG). The mandatory basic health insurance policy covers accidents, maternity and illnesses. People are allowed to choose the insurance provider operating in their place of residence.
There is an exception from mandatory health insurance in case you are a holder of the European Health Insurance Card (EHIC) which allows you the access to state provided healthcare during a temporary stay in Switzerland, but have in mind that your European Health Insurance Card doesn’t cover any private healthcare costs.
If you have equivalent insurance coverage according to KVG/LAMal and you are coming from EU/EFTA country you may be exempted from the compulsory health insurance. An exemption of three years can be granted, which can be extended for a maximum of another three years.
Full list of EU/EFTA see here.
You are free to choose your own insurance company. You can buy your insurance directly online, on the website of the insurance company, this way you can save yourself some time and some money.