The program and level of degree you’re pursuing will determine how long you spend studying abroad. While a graduate degree, such as a master’s degree or equivalent, will typically take one or two years of study, an undergraduate degree will typically require three or four years of full-time study (for example, in the UK the typical length for most subjects is three years, while in the US the norm is four). Typically, a doctorate (PhD) program lasts three to four years.
There is also the option of studying abroad for a shorter amount of time at various institutions all around the world. You may study abroad for a year, a semester, or even just a few weeks thanks to student exchange programs. Both the website of the institution you want to be hosted by and the website of the primary university you want to enroll at should provide information about these shorter programs.