This should be your last resort to help pay for school after looking into scholarships and institutional aid (money given to students from the college).
Taking out a loan is a very personal decision therefore it is important to learn what it means to take out a student loan before you agree to do so. There are some loans that don't acquire interest until 6 months after you graduation like unsubsidized loans.
If you think you are going to have to take out a loan, don't be afraid, be prepared. Many students take out loans to fill their financial need gap.
A common piece of advice is "Your amount of student loans should be less than your first year post-graduation salary." and only take out what you need. A school might offer you 12k in loans but in reality you only really need 10k.