On private projects, an unpaid subcontractor can file a lien on the property. Public property generally can't be liened, so states require payment bonds on public works instead. If the prime contractor doesn't pay, subcontractors and suppliers can claim against the bond.
Texas example: Government Code 2253.021 requires a payment bond on a county public work contract over $25,000 (municipalities: over $50,000).
If you are a subcontractor or supplier
Claims against a payment bond have strict deadlines and notice rules set by state law. Keep copies of invoices and delivery records, ask the county for a copy of the bond at the start of the job, and act quickly if payments stop.
If you are the prime contractor
The payment bond is usually issued together with the performance bond by the same surety.