HMRC pools identical shares into a single section 104 holding with an averaged cost, so UK investors cannot choose which lot is sold in the way specific-identification-cost-basis allows in the United States. Matching rules apply same-day acquisitions first, then those in the next 30 days, before the pool.
The annual exempt amount has been cut sharply in recent years and rates depend on your income band and the asset type. Losses must generally be claimed to be usable and can be carried forward once claimed.
Very active traders occasionally fall into trading income treatment instead, taxed as self-employment, but HMRC applies this rarely to people managing their own money. uk-spread-betting-tax treatment is a separate matter entirely.
This is general information about the United Kingdom, not tax advice. Rules change and depend on your circumstances; consult a qualified adviser or HMRC guidance.
Related: hmrc, uk-bed-and-breakfasting-rule, uk-spread-betting-tax, stocks-and-shares-isa, uk-stamp-duty-reserve-tax