Stamp duty is a re-registration tax. That means you pay it whenever you buy (but not sell) a registered asset.
Stamp duty is a tax incurred when you buy (but not sell) a registered asset. The most common examples are property (the buyer's name has to be recorded at the Land Registry) and shares (the relevant company share register has to be updated).
Originally, stamp duty was justified as the government's way of recouping the cost of the re-registration of property. However, given that this all now takes place digitally, that logic has disappeared in short, it's just a tax, pure and simple.
The rates at which the tax is paid vary. On shares in the UK, it is 0.5% of the purchase price.On property, on the other hand, the rate varies according to value and the buyer's situation. This rate is also fiddled with a lot more regularly by politicians.
Currently, for house values of up to £125,000 the rate is zero, up to £250,000 it's 2%, up to £925,000 it's 5%, up to £1.5m it's 10%, and over that it's 12%. These days, you pay stamp duty on the increasing portions of the property price above £125,000, rather than on the whole price (which used to be the case). The rates are higher if you're buying a second home an extra 3% surcharge applies.
There are also different rules if you're buying your first home if the purchase price is £300,000 or lower, you don't pay stamp duty; or if it's up to £500,000, you'll pay stamp duty of 2% on any amount above £300,000.