Definition
A B-tree index is the default index structure in relational databases: a sorted, wide, shallow tree over the indexed columns. A lookup descends a handful of levels — a few page reads — to locate matching rows, instead of scanning all of them; on a 50-million-row table that is the difference between milliseconds and seconds. Because the tree is sorted, it also serves range scans (BETWEEN, ORDER BY) efficiently, which hash indexes cannot.
Indexes are not free: every INSERT and UPDATE must maintain them, so you index the columns you query by, not everything. Composite indexes follow the leftmost-prefix rule — an index on (last_name, first_name) is a phone book: it serves lookups by last name, or last name plus first name, but not first name alone. A covering index (one containing every column the query needs) lets the database answer from the index without touching the table at all.
How it comes up in interviews
"This query is slow — why, and what do you do?" is the most common database probe at every level. The expected reasoning: identify the scan, propose the index, state the write-amplification tradeoff, and — for composite indexes — get the leftmost-prefix rule right.