What are they?
Database Indices simply sort the data in a database table in a way that makes it easier to search for a specific row or set of rows.
How does it do this? It maintains a sorted view based on teh values of one or more columns in the table. And now on this view, instead of having to run $O(n)$ searches, we can do something smart like a binary search, which then works in $O(log n)$ time.
They also allow for more efficient range queries; using the exact same strategy as above, we can find the start and end of the range in $O(log n)$ time, and since everything’s sorted…everything between the start and end is part of our result.
Trade-offs
In order to make the search faster, we have to pay a price. The price is that we have to update the index every time we update the table. This means that the write operations are going to be slower.