S&P Global Interview Question

How do database indexes work ?