When you buy a house, if you don't pay the entire amount (we speak about 500K to 1 mil) than you take a mortgage from bank. Mortgage means you borrow money from bank and every month you pay them back with a significant %. Usually between 2.5 to 3.5 and up.
when you take a line of credit - bank appreciate the entire cost/value of your house and say that your house on the market cost 500K and they are ready to give you 50% credit line. Means that you have an open "credit line" = opportunity to borrow in the bank at any given moment up to 250K. If you don't need money now it remains only as opportunity to borrow. The moment you take this money (or part of it) and ask you to pay % on the sum you took. You can use this money for a month and then put back everything + % for time you used them or use them as mortgage and pay every month % + any amount you can return.
People usually take credit line to invest in business (when they now they will have more money later) or when they earn a lot now and can pay off their mortgage with credit line faster than if they would pay only mortgage.