Make a list of all of the items you need to have an informative measure. Choose reasonable weights for each item. Measure each item accurately. Multiply each item by its weight, and add them up. So you make up a representative list of items, weight them by the average percentage of income people spend on them, send people out to check the prices, and compute the index.
REAL measures adjust for changes in the purchasing power of money.
No index is perfect, but some are worse than others. Government services counted at cost, even though they use up about twice the inputs to get the same output. Leisure and non-market goods ignored. Pollution, crime, etc. not fully counted. Black market usually not measured.