High level introduction to How Database internally work
While SQL query parsing, SQLite generate a sequence of instruction that needs to runs in order to generate the result. To find the data in given Btree which used indexing, SQLite start move cursor to the root node first element and perform a B-tree search. If there are no Btree indexing available, SQLite searches the matching record in the B+tree by using linear search.
Source: madushandhanushka.wordpress.com