An index is a structure for finding data fast without checking every row of a table. It works like a book's index: instead of flipping through 500 pages, you look up the word and go straight to page 312. It can be built on 1 or more columns, and it works both for single lookups and for reading data in order. Without an index, finding 1 row among 1 million means checking 1 million.
An index isn't free: in exchange for faster reads, it takes extra space and makes writes slower. Every time you add, change or delete a row, the database must also update the index. It's like keeping a book's index while the book is rewritten every day: every new page forces you to fix the index. With 5 indexes on a table, each insert writes 6 times: the row and the 5 indexes.
When you create an index on a column, the database stores that column sorted along with a pointer to the whole row. Searching the index is fast because it's sorted; then the pointer leads to the row. It's like a mall directory: you look up 'shoe store' and it says 'store 214'. Indexes also let you see the same data in different orders or filters without copying the table.
In a dense index there's an entry for every row of the table. Each entry has the search value and the pointer to its row, so you find any row directly with a binary search. It doesn't require the data to be sorted. In exchange, it uses more memory and costs more to maintain: every insert, change or delete touches the index. It's like an address book with every contact: everything is there, but it's thick. 1 million rows means 1 million entries.
In a sparse index there are entries for only some rows, for example 1 per page of 100 rows. It uses less memory and costs less to maintain, so inserts, changes and deletes are faster. In exchange, lookups are slower: the binary search takes you to the right page and then you have to scan it. It's like a dictionary that only marks the first word of each page: you reach the page and search there.
Dense and sparse are a trade-off. Dense: faster lookups, but more memory and slower writes. Sparse: less memory and faster writes, but slightly slower lookups. It's like choosing between an address book with every contact or one with only the first person for each letter. If the table is read a lot, dense fits; if it's written a lot and the data is sorted, sparse.
Looking up with a sparse index takes 2 steps: first a binary search on the index to find the page where the data should be, then scanning that page row by row. It works because the data is sorted: if the page starts at 500 and the next at 600, 557 must be in the first. It's like looking up 'mango' in a dictionary: you go to the page starting with 'man' and read until you find it.