The document demonstrates how breadth-first search (BFS) works on a graph to find the shortest path between nodes. BFS progresses level-by-level, adding all neighbors of discovered nodes to a queue and processing the queue in a FIFO manner. At each step it is shown how the queue is populated and emptied to discover all nodes reachable from the starting node s.