Sick leave in Switzerland works quite differently from the Spanish system, and understanding it before you need it avoids unpleasant surprises.
First: if you cannot work due to illness, you must inform your employer as soon as possible, that same day if possible. This is not a formality: it is a contractual obligation. In most companies, a medical certificate is required from the third day, although the contract may request it from the first. If you do not present it in time, the employer can deduct those days from your pay.
What you are entitled to: Article 324a of the Code of Obligations (CO) requires the employer to pay your full salary during sick leave. In the first year of employment, this minimum is three weeks. From the second year, the duration increases with seniority according to cantonal reference scales. However, most companies have a daily benefits insurance (Krankentaggeld) that covers 80% of salary for 720 days within a period of 900 days. This insurance replaces the employer's direct obligation, and the law requires the employer to pay at least half the premium.
Two things many people do not know: there is no waiting period in Switzerland, meaning you receive compensation from the first day of sick leave. And your contract is protected: the employer cannot dismiss you during sick leave, for a period of 30, 90 or 180 days depending on your seniority.
If the company does not have this insurance and only applies the legal minimum, the coverage is considerably shorter. It is worth knowing before you need it.