Depth-first search is a recursive algorithm that starts at the root node of a tree or graph and explores each path to its greatest depth before moving to the next path. It uses a stack data structure and has advantages of low memory usage and faster goal finding compared to breadth-first search in some cases. However, it risks getting stuck in infinite loops and not finding solutions. Variations include depth-limited search, uniform-cost search, and iterative deepening depth-first search.