You should obtain your student visa before departure at your home country. It is a requirement for formal registration as a student at a Turkish university. Therefore, students who come to Turkey without a student visa will neither be allowed to register as a student at the university nor receive a resident permit once in the country.
Timing of your visa application is important and has important consequences. Visa procedures usually take 6 to 8 weeks on average. Therefore, you should apply as soon as you receive your official acceptance letter from Istanbul Okan University.
The student visa will be stamped in your passport.