The cost of living tends to increase over time. This is usually measured by the same national statistical agencies that measure economic growth (e.g. the Office for National Statistics in the UK). Inflation is measured by regularly surveying the cost for a typical basket of goods consumed by people in a country. This “consumption basket” changes over time as fashions change e.g. duvets, Cinzano, VHS recorders and muesli in the 1980s, fromage frais and CD players in the 1990s, chicken nuggets, MP3 players, satnav and Freeview boxes in the 2000s and garlic bread, tablets, microwave rice, coffee pods and computer game downloads in the 2010s. But the ONS builds a price index which combines all these prices into one number.
The index, known as the Consumer Price Index (CPI) rises as the cost of goods in the consumption basket rises. Inflation linked bonds have their repayment amount and coupon payments linked directly to inflation indices. Investors buy inflation linked bonds them to provide protection against the rising cost of living. Shares tend to fall in value when inflation becomes too high (above 4% per year) or too low (below 1% per year). If the cost of living is falling this is called deflation and if the rate of change of inflation is slowing this is called disinflation. Central banks usually try and steer inflation to be around 2% by setting the level of interest rates: if inflation is below target they raise rates, if it is too low they lower rates.