There's two ways to get the capital back. One is you just wait for the gilt to mature and the other is to sell it in the market before it matures.
If you buy, e.g., a 10 year gilt and wait for it to mature then the money will just appear in your account when it does, in 10 years time, and you'll know from the moment you bought it exactly how much that will be, either in nominal terms for conventional gilts or in real (RPI adjusted) terms for index linked gilts.
If, OTOH, you sell it in the market before it matures then you'll get whatever the market is offering, with no guarantees that it won't be less than what you bought it for, maybe a lot less.
There's plenty written on the Gilts and Bonds board, take a look through the list of topics there.
Gilts held to maturity became popular around here in the months following the Truss-Kwarteng debacle, as net of tax shorter term low coupon gilts were offering better returns than equivalent period savings accounts, and indeed I swapped a lot of my savings accounts into such gilts, both conventional and index linked. However, the situation now looks like it's reversed and when the first of those matures next month I'll very likely be putting the money back into normal savings accounts again
Many thanks for this - very useful. I would follow suit and put the money into a high interest savings account but the money is held within two old company pensions - which I would like to transfer over to my SIPP in AJ Bell as
1 The money is tied up in useless funds
2 They don't do drawdown