In either case there are a number of restrictions to the ability of a company to do this, and a number of processes that a company must go through.
The first important restriction is that buy backs must usually only be made from distributable reserves (these are only created once the accumulated losses and profits of a company from its inception are in aggregate greater than zero). This means that most early stage businesses will not be able to do this for some time.
The only exception is for the buy-back to be from capital, but in this case it is very restricted in that the amount must be the lower of £15,000 and 5% of the aggregate nominal capital of the company at the beginning of the year. As most limited companies have an aggregate nominal capital of only up to £100 or maybe £1000, this severely restricts the amounts that can be paid. In effect, it means that buy backs out of capital will typically be only for nominal value or lower. An example of a case when this may be of use is for shares that are bought back at nominal value as part of a bad leaver clause.
The second restriction is that buy backs are treated by HMRC as a distribution, so will qualify for income tax rather than Capital Gains Tax (ie if they are EMI shares they will lose the CGT @ 10% specific benefit). For SME's, the only exception is if the shares have been held for 5 years and the buy back can be deemed to be in the best interests of the company (for example if a founder leaves). In this case pre-approval from HMRC of this treatment should be sought.
Like most changes in equity, it is important that this is formally authorised, typically by both a Board and Shareholder resolution that confirms that there are sufficient reserves, that it is a prudent course of action and that waives any pre-emptive rights. It must also be something that is allowed under the Articles of the company.
Once the resolutions are passed, there are a number of steps:
1) Complete a share purchase agreement between company and shareholder to formalise the exchange
2) Complete an SH03 and SH06 and send to Companies House (only an SH03 required if the shares are to become Treasury shares, an SH05 will be needed if these are then subsequently cancelled)
3) Update the share register accordingly
4) Within 30 days inform HMRC (your standard company corporation tax office) of the buy back specifying whose shares were bought, at what price, and whether this is to be treated as a distribution or a capital release.