In both cases, ownership of the equipment is transferred to the customer at the end of the contract term.
With leasing, the customer can immediately claim the monthly instalments as operating costs for tax purposes.
Hire purchase is more like paying in instalments, and VAT must be paid in advance. Hire purchase is treated as a cash purchase for tax purposes.