Bally's Interactive interview question

How genetic algorithms work?