If you intend to stay in Slovakia for less than 90 days, it is important to know what kind of activity you plan to perform here. In case you will:
study at university (irrespective of the study level, including PhD studies),
carry out research under a Hosting Agreement (this type of employment does not require a work permit nor confirmation on the possibility to fill a vacant position and besides a work contract the activity can be performed under agreements on work performed outside employment relationship, or on the basis of a granted scholarship),
participate in a scholarship/fellowship programme approved by the Slovak Government, a European programme or a programme arising from an international agreement binding on Slovakia (upon an invitation letter and/or letter of award without work contract, or only with a contract with limited scope of activities, when a work permit or a confirmation of a possibility to fill a vacant position is not required),
undertake an internship as a part of your study outside the territory of Slovakia or within the period of two years after obtaining a degree (under a certificate of internship),
perform lecturing or artistic activity (upon an invitation letter or a confirmation, without an employment contract, or only with a contract with a limited scope of activities, when a work permit or a confirmation of a possibility to fill a vacant position is not required),
it is NOT necessary to apply for a temporary residence. However, in all these cases it is important to find out whether you need the visa to enter Slovakia (or Schengen Area in general).
If your planned activity is not covered by the points 1 - 5 and you will be employed above the scope of the these conditions under a work contract, even if the length of your stay does not exceed 90 days, it is necessary to apply for a temporary residence. Continue as if your stay was longer than 90 days.