How do dividends work for a small company?
Most owner-managed companies pay the director a modest salary through PAYE and take the rest as dividends, because dividends do not attract National Insurance. The split that makes sense depends on rates that change at Budgets, so the current position is on gov.uk or with your accountant.
A dividend is a distribution of profit, not a cost. The company earns profit, pays corporation tax on it, and what is left is available to distribute. If there is no profit after tax, or accumulated profit from earlier years, there is nothing to distribute and any payment is unlawful.
Paying one is a formal act, even in a one-person company. The directors resolve to pay it, minute the decision, and issue a dividend voucher to each shareholder showing the date, the company, the shareholder and the amount. Dividends are paid in proportion to shareholdings, so two equal shareholders get equal dividends.