S&P Global interview question

What are indices and how do they function