A genetic algorithm (GA) is a search heuristic that mimics the process of natural selection. It uses techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover to generate solutions to optimization and search problems. Genetic algorithms are particularly useful in situations where the search space is large and complex.