If the company purchases the shares for more than their original issue price, the excess is normally treated as a distribution of profits (like a dividend). This income is then subject to income tax.
The remainder of the purchase price (up to the original issue price of the shares) is taken as the sale price for Capital Gains Tax purposes. If you purchased the shares for more than their original issue price, this will lead to a capital loss that can be set against any capital gains that you have.
In some circumstances it is possible for the whole of the price paid on repurchase of shares by an unlisted company to be taxed as capital gains rather than income. This can reduce the total tax payable. As this is a complex area, you should take advice.