The basis of QBI is that self-employed individuals may deduct up to 20% of their qualified business income, subject to profession and income limits. The easiest way to think of this is 20% of your company's net profit (the amount that goes on your tax return) can be deducted for tax purposes.
This flowchart is a good starting point when determining eligibility for QBI.