Relational databases can organize their data in a way that makes it more efficient to add/update/read/delete from. Similar to books, using SQL we can create indexes which defines how to our organize data behind the scenes.
9.1 PostgreSQL docs
How MySQL Uses Indexes
Indexes and Index-Organized Tables
Clustered and Nonclustered Indexes Described