If you decide to register for the CIS then the contractor must deduct and withhold tax at a rate of 20% of the amount of your invoices.
If your invoice includes direct expenses such as materials or tool hire, then tax should not be withheld from these amounts, as you should be paid 100% of these costs without any CIS deductions withheld.
The 20% deduction is then paid by the contractor to HMRC who treat it as an advance payment towards your income tax and National Insurance contributions (NIC) for the particular tax year, as shown by your Self-Assessment tax return.
You then receive 80% of your invoice paid directly to you, according to your agreed invoice terms, along with the full amounts for any additional costs, such as materials.
The advantage of registering under the CIS is that the contractor only withholds deductions of 20% instead of 30% if you decide not to register.
Also, if you register for the CIS and your tax affairs are up-to-date then you can apply to HMRC to have gross payment status, which will allow the contractor to pay you without making any deductions at all, so you should be paid 100% of your invoices. GOV.UK explains the conditions you must pass for HMRC to agree to your application for gross payment status.
You can apply for gross payment status at the same time as registering as a subcontractor.