Indexes improve the speed of data retrieval from database tables. Primary indexes are automatically created on key fields of a table. Secondary indexes can be created on non-key fields to support faster searches on those fields. Indexes work by creating a separate index table that contains pointers to the actual data records, allowing data to be located more quickly than scanning every row.