ConnectedComponents returns a list of components where each component is given as a list of vertices.
For an undirected graph, the vertices u and v are in the same component if there is a path from u to v.
For a directed graph, the vertices u and v are in the same component if there is a directed path from u to v and from v to u.
For directed graphs, strongly connected components are computed. Weakly connected components can be computed through ConnectedComponents[UndirectedGraph[g]].