Understanding skip pointers in BlockIndex in bitcoin sources
It is implenting a skiplist.

Every index node points to its immediate predecessor (pprev), and to some other predecessor that is further away (pskip). These skip pointers are used when we need to find a far predecessor quickly. One common case is when we need to find the 2016th ancestor of a block to recompute the target difficulty.

Most of the skip pointers only go back a few blocks, but ocassionally one points back very far, allowing many nodes to be skipped.