Bacteria can degrade toxic wastes by using metabolic pathways (basically digesting them). This is because in a bacteria cell, there is a circular strand of DNA (plasmid) and by inserting extra genes, the bacteria can do tasks like breaking down toxic wastes. When a bacteria is successfully modified (after it reproduces by cell division), the cell will copy the bacterial DNA and the gene that was inserted into the plasmid too. So, there will be an endless supply of bacterial that can do a desired task (eg clean up oil spills and other hazardous wastes)
Hope this helped!