How does a database index actually make a query faster?
It is a separate, sorted structure — normally a B-tree — mapping column values to row locations. Without it the planner has to read every page of the table and test each row. With it, the tree is descended in a handful of page reads to find exactly the rows that match. The win is not "it is faster", it is that the work stops growing with the size of the table.
The cost nobody mentions: every index is another structure to update on every write, and another thing to keep in memory. Indexes are a read optimisation paid for by writes.