From the Washington Post:

Depending on whom you listen to, genetically modified crops are either ungodly Frankenfoods unfit for even a house pet or our only hope against famine in a post-climate-change world. Putting aside all the shouting, it’s interesting to examine how scientists modify plant genes. This is the story of how ordinary crops become transgenic crops.

The first step in the process is finding a useful gene. (In most cases, genetic modification involves adding genes to a plant rather than removing or disabling genes.) These discoveries can be serendipitous. Scientists around the globe are working furiously to map the species’s genomes. In some cases, they stumble across something useful, such as a gene that produces a fungus-fighting protein.

But multinational agricultural companies aren’t just hoping for some nerd in a university laboratory to get lucky. Instead, they’re spending huge sums hunting for genes that might fulfill pressing agricultural needs. This usually involves turning off or enhancing genes and observing the consequences. Does the change create pesticide tolerance? Does the fruit ripen more quickly? Those are indications that the gene could be promising.

For more, see: Developing genetically modified crops requires skill, luck and caution