CO2 can be compressed and stored in various geological settings, the simplest setting to understand being in depleted offshore oil and gas wells. A large amount of CO2 naturally exists trapped in such geological structures, and 25 million tonnes of CO2 has been stored under the North Sea from Norway over the last 25 years, allowing careful study of how best to do this. The UK is now building its own geological CO2 storage below the Irish Sea and North Sea. The Royal Society has summarised our understanding of geological storage of CO2 in this policy briefing.
Diagram from Royal Socety Report showing how the CO2 is trapped.