Is a home equity line of credit used to pay off a mortgage?

Not usually. There isn't much point, you're just trading one lien for another. And usually the line of credit will have a higher interest rate then the mortgage. If not, it may make sense to get a lower credit rate.