S&P Global interview question

How do database indexes work ?