Genetic algorithms imitate natural selection by evolving a population of potential solutions. They use fitness functions to evaluate how close each solution is to the desired outcome. Roulette wheel selection probabilistically selects solutions for reproduction based on their fitness, giving fitter solutions a greater chance of being selected. This process is repeated over multiple generations until an optimal solution emerges.