Yes, health insurance is mandatory for all residents in Switzerland, including foreign students. Regardless of age, personal healthcare insurance law will apply to anyone in the country for more than three months.  If not insured after three months, the student will be treated as a resident and will be assigned insurance by the Swiss prices, which is more expensive.