That's basically how a company views your summer time with them. They get a chance to see how you fit in with their company, what you are capable of, how big or small of a risk you will be to hire, and they may get you to do some work in different types of settings to see how capable and flexible you are. You, on the other hand, get to bag some professional experience, network with other professionals, and pick up the soft skills that will benefit you later on when you are interviewing and eventually selecting a full-time offer.
It's hard to get an internship as a freshman or even as a sophomore, but you need to try and at least familiarize yourself with the companies and positions that are out there, so by your junior year you know exactly what to look for. You may go to a career fair and experience the typical response from a recruiter, "Oh, you're only a sophomore. Well, we are really looking for juniors and graduating seniors...". Who cares? At least you practiced talking with a recruiter and made yourself available. That will go a long way in the long run.
There are some other tips and advice for landing internships and jobs as a college student in this article from USAtoday.com.
