Alpha-beta pruning is a search algorithm used to reduce the number of nodes evaluated in a minimax search tree for machine playing of two-player games. It uses two values - alpha (the best value for MAX) and beta (the best value for MIN) - to prune subtrees without affecting the result when alpha is greater than or equal to beta. The algorithm traverses the search tree depth-first, updating alpha and beta at each node to cut off subtrees that won't influence the final value. This pruning technique preserves the optimality of minimax while evaluating fewer nodes.