An introduction to the btree index implementation can be found in src/backend/access/nbtree/README.
src/backend/access/nbtree/README