Under the Construction Industry Scheme (CIS), contractors take tax off payments to subcontractors and pass it to HMRC. If you're registered for CIS, they deduct 20% from the labour part of your payment. If you're not registered, they deduct 30%. If you qualify for gross payment status, they deduct nothing.
Who it applies to
Construction work in the UK paid by a contractor, such as a builder or developer, to a subcontractor. Most work for homeowners isn't covered.
Register
Registering with HMRC as a subcontractor drops the deduction from 30% to 20%. It's done through GOV.UK.
Labour, not materials
The deduction is taken from the labour part, not the materials you supplied, so show them separately on your invoice.
Getting it back
The money deducted counts towards your tax and National Insurance. If too much was taken over the year, you claim it back through your Self Assessment, or through your company's payroll if you're a limited company.
Gross payment status
If your business meets HMRC's tests on turnover and paying tax on time, you can apply to be paid with no deduction.
This is a summary. GOV.UK's CIS pages and an accountant have the full picture.