EU/EEA citizens are not required visa to enter Latvia. There are also additional visa-free countries whose citizens do not need visa to enter Latvia, however, the citizens of these countries may reside in Latvia only max. 90 days within a 6 months period, therefore, students are required to undergo a certain immigration procedure after their arrival to Latvia. The citizens of other countries need to apply for visa prior to their arrival to Latvia.
There are several ways how to organize students' arrival to Latvia (visa, residence permit). Since 2014, exchange students are advised to apply for long-term visa (either at the Embassy of Latvia in their country of residence or, for citizens of visa-free countries, at the Office of Citizenship and Migration Affairs in Riga).
Please, read carefully information about the steps you need to take in order to fulfill the immigration requirements.