Really great question. So every college is different and some universities require you to live on campus for a certain amount of years while other colleges don;t care at all and will let you decide where you want to live. I went to a college in Washington DC and we were required to live on campus for 2 years, after that the choice was ours. We were guaranteed accommodations for two years, after that there was not a guarantee. I lived on campus for 2 years (as required) and afterwards I decided to live off campus for the remaining 2 years. There are pros and cons to each of the two options so be sure to weigh them carefully.
On campus often in cheaper, but come with more rules, often worse in quality, and also less privacy; off campus on the other hand can be of better quality and better privacy, but is often more expensive than a student dorm. Examine the benefits and impact of both options and take your personal situation into account when deciding to live on or off campus.
I hope this helps and I wish you the best of luck.
(check your college's website for information regarding housing)