A lien is a legal claim or encumbrance placed on a property as security for a debt or obligation. It gives the lienholder a right to be paid from the property, and in some cases to force its sale if the debt is not satisfied.
Liens can be voluntary, like a mortgage the owner agrees to, or involuntary, like a tax lien, mechanic's lien for unpaid contractors, or judgment lien from a lawsuit. They typically must be paid off, or otherwise resolved, before a property can be sold with clear title.
A title search reveals recorded liens so they can be addressed before closing. Unresolved liens are a common title defect, which is one reason lenders require a title search and title insurance.