You need to get a lien release from the bank which means that the seller will have to pay off the loan prior to transferring the title to you.
Buy it ONLY if the lien holder's BANK in your city, you MUST go to the bank with SELLER and pay cash they can release the lien on the spot.
On the other hand, in some cases, you're dealing who's selling a car with an outstanding loan, which is probably 25% or more cheaper than anywhere else might be a scam.