You have the right to sick leave. It is important to report being sick from the first day. The administration staff or HR office at your department can most likely help you with instructions on how to report being sick..
If you are employed, you get sick pay, partly from your employer, partly from Försäkringskassan. In general the following applies: the first day is a qualifying day (karensdag) and you do not get any pay. Between the second and 14th calendar day you get sickness pay (sjuklön) from your employer. From day 8 you need to submit a doctor’s certificate to your employer. Afterwards, it is Försäkringskassan who pays benefits in the form of sick pay (sjukpenning). Your employer may supplement this with 10 percent of your monthly salary as sick pay supplement (sjukpenningtillägg). You should register the leave, from the first day, with Försäkringkassa in order to access the benefits. Here is their page for employees who are dealing with sickness or injury. You can find information about benefits, your rights, and how to register leave.
If you are financed through a scholarship, you get compensation through the Health and parental insurance for doctoral students with stipends, where The Legal, Financial and Administrative Services Agency (Kammarkollegiet), is the insurer. This insurance applies to doctoral students who don’t have equivalent insurance from another source. You can consult the terms of the insurance on the agency’s website, here. You can also ask the HR department or administrative staff at your institution about this insurance.
You should keep in mind that you are able to receive prolongation of your doctoral studies due to leave – it is important from this point of view that your report leave with your employer from the first day. If any issues arise with sick leave, you can ask your student union, the ombud for doctoral students, or your trade union, for help.