The summer before your freshman year in college means choosing classes and figuring out how you are going to pay the bills. Chances are you will need a loan. An estimated 2 out of 3 students have debt when they leave school. Here are five things you need to know about getting your first student loan.

Opt for federal loans before private ones

Get federal loans first by completing the FAFSA. They are preferable because you don't need credit history, and federal loans have income-driven repayment plans and forgiveness that private loans don't. You may be offered two types: unsubsidized and subsidized. Subsidized loans for students with financial need don't build interest while you are in school. Take a private loan only after maxing out federal aid.

Borrow only what you need and can reasonably repay

Undergraduate students can borrow up to $12,500 annually and $57,500 total in federal student loans. Private-loan borrowers are limited to the cost of attendance — tuition, fees, room, board, books, transportation and personal expenses — minus financial aid that you don't have to pay back. Aim to borrow an amount that will keep your payments at around 10% of your projected after-tax monthly income. You will pay fees and interest on the loan

You are going to owe more than the amount you borrowed due to loan fees and interest. Federal loans all require that you pay a loan fee, or a percentage of the total loan amount. You will also pay interest that accrues daily on your loan and will be added to the total amount you owe when repayment begins. Federal undergraduate loans currently have a 5.05% fixed rate, but it changes each year. After you agree to the loan, your school handles the rest

Your loan will be paid out to the school after you sign a master promissory note agreeing to repay. "All the money is going to be sent through and processed through the financial aid office," said Joseph Cooper, director of the Student Financial Services Center at Michigan Technological University. Then, students are refunded leftover money to use for other expenses.

You can use loan money only for certain things

"You cannot use it to buy a car," said Robert Muhammad, director of the office of scholarships and financial aid at Winston-Salem State University. "It's specifically for educational purposes: books, clothing, anything that is specifically tied to the pursuit of their education." You also can use it for transportation, groceries, study abroad costs, personal supplies or off-campus housing.