A genetic algorithm is an optimization technique inspired by the process of natural selection, which is used to find approximate solutions to complex problems by iteratively improving a set of candidate solutions. It mimics biological evolution through operations such as selection, crossover, and mutation to evolve solutions over generations towards an optimal or satisfactory outcome.