In most countries a bonus is taxed exactly like salary: it joins your income for the year and is taxed through the same bands. The surprise on the payslip comes from withholding mechanics. Payroll often has to withhold on a bonus as if that month's pay were your normal level, which can push part of it into a higher band for withholding purposes, or apply a flat supplemental withholding rate where the system uses one.
What is withheld during the year is an estimate settled later. If too much was withheld on a bonus, the excess comes back through the annual reconciliation or a tax refund; if too little, you pay the difference. This is why a bonus can look heavily taxed in the month it lands and yet cost no more, in the end, than the same amount paid as salary. The final rate on a bonus is simply your marginal band: the band your last slice of income falls into.
You generally cannot choose how a bonus is taxed, but timing and pensions sometimes help. Where pension contributions are deducted before tax, paying part of a bonus into your pension can shelter it. Splitting a bonus across a tax year boundary can matter when you sit near a band edge, though few employers offer the choice. What never works is asking for the bonus off the books: undeclared pay is a legal risk for you as well as the employer, and it builds no pension, no record and no proof of income.