Topological sort is an algorithm used to linearly order the vertices of a directed acyclic graph (DAG) based on their dependencies. It employs depth-first search (DFS) to visit all the vertices, resulting in a time complexity proportional to the sum of the number of vertices (V) and the number of edges (E), denoted as O(V + E).