In most state, a mechanic's lien is a simplified lien process without filing a lawsuit for service rendered by a contractor. A normal lien can only be attached after a legal ruling. Mechanic's lien is helping contractors getting paid, preventing homeowner from selling the house and dissapearing.
Following is a brief process, the deadlines and certain terms might be different between states.
First, contractor has to render service. and failed to get paid.
Second, contractor has to file the mechanic's lien within a certain period of last day of service, usually 60-90 days from last day of service. If the contractor failed to file the mechanic's lien within this deadline, he loses the right to file a mechanic's lien.
This lien will stop the house being sold. Sometimes the lien is enough to force the parties to resolve dispute.
Thirdly, contractor has to file a lawsuit within 180 days from last day of service or from 90 days after the filing of the lien. This is called perfect of the mechanic's lien.
If the contractor failed to file the lawsuit before the deadline, the lien becomes invalid. Homeowner can file paperwork to remove it.
If the contractor sues and loses, the lien becomes invalid.
If the contractor sues and wins, the homeowner has to pay, or the mechanic's lien because an actual lien that has no expiration date.