Depth-first search (DFS) is an algorithm that explores all the vertices reachable from a starting vertex by traversing edges in a depth-first manner. DFS uses a stack data structure to keep track of vertices to visit. It colors vertices white, gray, and black to indicate their status. DFS runs in O(V+E) time and can be used for applications like topological sorting and finding strongly connected components. The edges discovered during DFS can be classified as tree, back, forward, or cross edges based on the order in which vertices are discovered.