This is not the first story I've done where a supplier puts a lien on someone's home... which is why it's a good idea to protect yourself from it happening.
It happens when you pay the contractor for all the work to be done. He or she is supposed to then pay for the supplies and material out of that money. The material is used in your home. But if the contractor fails to pay the supplier, the supplier can come after you. They can put a lien on your property. This is basically a financial hold and it means that if your property gets sold, they're entitled to payment.
There are 2 ways to protect yourself (if you have a good reputable builder - one who is local and well established you should be fine). If you're concerned, ask the contractor/builder to show you their receipts for all material purchased. Understand that the builder/contractor may mark up the material for their profit - and that's ok - as long as you know that the supplier has been paid. Or you can ask for a lien release. Typically contractors won't get too excited about this one. It takes time to get the lien releases. Every time they get material from a supplier, the supplier signs the lien release. This means that they've been paid and if something were to go wrong, they're not coming after you. It releases your chance of getting a lien on your property.
When you pick a builder, you may first want to check with the Home Builder's Association.
If you work with a member and you have problems, the association has a board you can file a complaint through.
As always, get references and check with the Better Business Bureau.
If you're looking for more information on choosing a builder, there are several resources that can help. Here's a link to Lowe's checklist. It's thorough and should help.