OK, I'm not sure if you are in the USA or elsewhere. That being said, I was self employed in the US for most of my adult life, and collecting income tax likely works much the same everywhere, because each problem has an optimal solution.
In the US, there are two categories of income earners, those who work for someone else and get a paycheck, and the self employed.
We owe three types of payroll tax. US income tax, payment into the national retirement system which covers Social Security (Old age pension) and Medicare (Health insurance for old people), and state income tax. We really are a union of states, and your state government provides most of your government services and issues and enforces most of the laws and regulations you live under. Even to the point where there is no US driver's license, instead you have a license issued by your state.
If you work for someone else, they withhold part of your paycheck and forward the money to the US and your State government as the year goes on. Then, at tax time, your employer issues an official document called a W2 Form that lists the income you earned and taxes you pre-paid and that information goes onto your Income Tax Return along with other income statements from things like investments and bank interest, and various deductions for things the government wants to encourage. You fill out the form, add up the various amounts, and come up with your income tax. Then you subtract the amount you prepaid and end up with either the tax you still owe or the refund you have coming if you overpaid. You do the same on a separate form for your state, and mail them in to the address they give you for each return. Or, like many people do now, you use software you purchase, I use TurboTax, and do the same thing on your computer and file electronically. Also, a sizable fraction of taxpayers pay a specialist to do their taxes for them, for a fee, of course.
If you are self employed, it is much the same except you have to make estimated tax payments four times during the year. There is a form for this that you can download from the US Internal Revenue Service and from your state tax authority's web sites. They have tax tables available and you can use them to make a guess as to how much you will owe, and then you send in 1/4th each time. The forms have four documents you can cut off with a scissors, and include with your check so they know who is paying what tax. At tax filing time, the process is the same except there is a separate line to enter your estimated tax payments, and the rest works exactly the same. Both my state and the US government have extensive pages of information covering most situations if you need help, and have call centers with help too.
And, it should not be a surprise, but there is a penalty if your withholding or estimated tax payments are much too low. For the US, if you owe more than $2000, you are penalized 10% for the amount over $2000. I forgot what the limit and penalty is for my state.