Here is how Kosaraju's algorithm works step by step:
Run DFS on the original graph. When a node finishes (all descendants visited), push it to a stack.
Build the transpose graph by reversing all edges. If exists, create instead.
Pop nodes from the stack one by one. For each unvisited node, run DFS on the transpose graph.
Each DFS tree from step is exactly one SCC.
Time complexity: for both DFS passes combined. Space: for the stack and visited arrays.