You will find information about costs and regulations when you need to seek medical care in Sweden on the following website: Care for foreign students - rights and fees - 1177 Vårdguiden
There are different charges that apply if you come from a country inside or outside the EU/EEA and Switzerland. This is also the case if it relates to emergency/necessary care or non-emergency, planned care.
If you’ll be studying in Sweden for more than a year, you can register for a Swedish personal identity number.
Once you’ve received your number, you’ll be entitled to medical care subject to the same terms and conditions as other people who are resident in Sweden.