An index is a separate, sorted data structure (a B-tree in InnoDB) that lets MySQL find rows without scanning the whole table. Without one, a lookup reads every row (a full table scan); with one, it walks a tree in a few steps.
Primary vs secondary
In InnoDB the table itself is the primary key index — a clustered index. Rows are physically stored in primary-key order, so the primary key lookup lands directly on the full row.
A is a separate B-tree keyed on other column(s). Its leaf nodes store the indexed value plus the , so using a secondary index often costs a second lookup ("back to the clustered index") to fetch the rest of the row.
