Adding to webdevduck's answer: Before you calculate your profits, you can pay money tax-free into a pension fund for the company director (that is you). Then if you pay yourself dividends, if you made lots of profit you don't have to pay it all as dividends. You can take some where the taxes are low, and then pay more money in later years.
What you must NOT do is just take the money. The company may be yours, but the money isn't. It has to be paid as salary or dividend. (You can give the company director a loan, but that loan has to be repaid. Especially if a limited company goes bankrupt, the creditors would insist that loans from the company are repaid).
After a bit more checking, here's the optimal approach, perfectly legal, expected and ethical:
You pay yourself a salary of £676 per month. That's the point where you get all the advantages of national insurance without having to pay; above that you would have to pay 13.8% employers NI contributions and 12% employee's NI contributions, so for £100 salary the company has to pay £113.80 and you receive £88.00. Below £676 you pay nothing.
You deduct the salary from your revenue, then you deduct all the deductible business costs (be wise in what you try to deduct), then you pay whatever you want into a pension fund. Well, up to I think £25,000 per year.
The rest is profit. The company pays 19% corporation tax on profits. Then you pay yourself dividends. Any dividends until your income is £11,500 per year are tax free. Then the next £5,000 per year are tax free. Then any dividends until income + dividends = £45,000 per year is taxed at 7.5%. It's illegal to pay so much in dividends that the company can't pay its bills.
Above £45,000 you decide if you want your money now and pay more tax, or wait and get it tax free. Every pound of dividend above £45,000 a year you pay 32.5% tax, but there is nobody forcing you to take the money. You can wait until business is bad, or you want a loooong holiday, or you retire. So at that time you will stay below £45,000 per year and pay only 7.5% tax.