Depending on the area it may be cheaper to buy a place versus rent for four year while in college, or while in grad school for five. Given that my DH and I bought a duplex you might think I am very pro-buying while a student is in school but it really depends on many factors.
First can you afford it? Buying a property requires a down payment, closing costs and emergency fund plus money for all the little expenses like lawn mowers, snow plows and even a washer and dryer. Most students do not have the money for all the upfront costs, even most graduate students may not have the money. Where would you get the money? Your parents?
That brings up the second point, especially if you are an undergraduate. Will your parents go along with the idea of buying a property? If so, who owns the property? If your parents are paying all the bills obviously they own it but to get owner occupied rates the person occupying it must be on the mortgage. How will you work that? That will affect your credit score and will affect if you can get loans later in life.
Also, at eighteen do you even have a credit score? Could you even get a mortgage even with your parents co-signing? You probably could but the interest rate may be a little higher than a rate your parents could get. This also means your parents need a good credit score and not much debt. Do you think your parents would qualify?
Then you must think, will you have the time to take care of the property, find tenants/roommates if you need them etc? I know that if my DH and I were not together neither of us could have bought the rental by ourselves. It was too much work and needed many different skills.
Then you need to check if the mortgage plus repairs will be lower than renting. You cannot be sure that housing will appreciate or even that it won't depreciate by the time you are done with school. You need to look at the costs of renting out the property when you leave. This means adding up all the monthly expenses plus repair and seeing if renting the place would cause you to break even if you only got rent for ten months out the year.
Now if every point work out, then maybe, just maybe, you would financial better off buying instead of renting but if even one of these does not work, don't buy. It won't help you, it will hurt you. Renting isn't a bad thing. My DH and I plan to rent while he is working a post-doctoral fellow because the time we will be in the area is so short. What each person needs to do is see what works best for them in their own situation.