Kosaraju's algorithm runs two DFS (depth-first search) passes to find all SCCs in a directed graph. First pass: Run DFS on the original graph and record finish times (when each node's DFS completes). Second pass: Reverse all edges to create the transpose graph, then run DFS in decreasing order of finish times.
Each DFS tree in the second pass corresponds to exactly one SCC. Here's how it works because reversing edges breaks connections between different SCCs but preserves connections within each SCC.