Commonly, genes from bacteria are inserted into a crop's chromosomes to produce pesticide substances to kill insects
For drought, I'm not fully sure, but Maize is a very drought resistant crop often introduced to communities which receive little rainfall. Maybe they take a gene from the maize crop and insert it into the chromosomes