Topological sorting is a linear ordering of vertices in a directed acyclic graph (DAG). It is performed by recursively processing vertices with no incoming edges before others. The algorithm uses a stack to push vertices after processing their adjacent vertices. It has applications in project scheduling, circuit design, and detecting cyclic dependencies. The time complexity is O(V+E) where V is vertices and E is edges.