01Go deep, then back up
BFS spreads like a wave; DFS behaves like a curious explorer. From the current vertex it steps to any unvisited neighbour and keeps going. When a vertex has no unvisited neighbours left, it backtracks to the vertex it came from and tries that vertex’s next neighbour.
On the same tree, BFS numbers the vertices level by level, while DFS finishes a whole branch before it touches the other side.
The natural implementation is recursion, so the call stack does the bookkeeping: void dfs(int v) { used[v] = true; for (int to : g[v]) if (!used[to]) dfs(to); }. It is BFS with the queue replaced by a stack. DFS does not find shortest paths, but it reveals structure: cycles, components, an order for tasks, bridges.