Suppose I employ a builder to do a job for me. For this, he charges £100 for labour, and £200 for materials at cost. Suppose his income tax is charged at 20%. So, he will give £20 in income tax from the labour (20% of £100), but what about for the materials? If he gives 20% of this (i.e. £40), then he will be making a loss from the materials. So, what happens in reality? Would the builder only be charged income tax on the services, and not the materials? And does he therefore have to declare explicitly which income is from services, and which from materials / other costs?
I will answer plainly, without UK-specific commentary:
Your 'taxable income' is generally your income, less your expenses. For a regular employee, generally you are not allowed to claim expenses, and therefore your taxable income is simply your salary.
For a self employed person, generally you are allowed to claim any expenses that directly relate to earning your income. In the case of a builder, these expenses would include materials used to build the product sold to a customer.
So, generally speaking, a builder in your example would report the full revenue of £300, and then report expenses of £200, leaving taxable income of £100. Given a UK tax rate of 20%, the builder would then pay £20 of income tax.