Lucy, sorry, you just have not given enough information. If you take out a second mortgage on a house you own, a lien goes on the house while you live there. If you bought a home that work had been done on but not paid for, it would be possible for a Workman's lien (Other names for same thing out there) could be placed on the home and you would be responsible. But, once property has changed hands and closed, I do not know of many liens that could come against that property except the workman's liens. If one did, I would take the problem to the title compnay that insured the property.
Your question leaves out too many details to give a clear answer, but, hopefully, the shotgun approach gives you some clues.
If this happened to you. First stop, the title company that insured it. Second stop, a lawyer to help you figure out what to do (if Title can not help.). Dave Atherton