A genetic algorithm is a stochastic numerical algorithm used to solve optimization problems where analytic or step-wise optimization is impossible or intractable. Genetic algorithms are a popular subset of Evolutionary algorithms which use common concepts in evolutionary biology and principles of the Theory of evolution such as: inheritance, mutation, selection, and recombination.
Solutions to a problem are randomly generated and then allowed to interact in a modeled environment. Various solutions can breed with each other producing new combinations, also at random intervals certain elements of the solution can randomly mutate. The fitness of any given solution to the problem is measured by a fitness function and those that are a better fit are selected for. This can either happen by increasing the rate of offspring reproduction in better solutions or by killing off solutions that perform worse.
Genetic programming is a type of genetic algorithm where the population consists of programs whose fitness is determined by their ability to solve a given problem.
Schmitt, Lothar M (2001), Theory of Genetic Algorithms, Theoretical Computer Science (259), pp. 1-61