They are related. You take a loan from a bank. They extend you credit.
It's rather complicated though. You can have a line of credit, which works like a loan, in which you can borrow up to a certain amount, pay it back, borrow more, pay that back, etc. That can be useful if you have a series of expenses coming up and your income will not be coming at the same time as the expenses.