The process of evolution acts on an E. coli cell by creating a mutation in the DNA. It is not uncommon for the DNA strand in an E. coli bacterium to get corrupted. An X-ray, a cosmic ray or a stray chemical reaction can change or damage the DNA strand. In most cases, a particular E. coli cell with mutated DNA will either die, fix the damage in the strand or fail to reproduce. In other words, most mutations go nowhere. But every so often, a mutation will actually survive and the cell will reproduce.
Imagine, for example, a bunch of identical E. coli cells that are living in a petri dish. With plenty of food and the right temperature, they can double every 20 minutes. That is, each E. coli cell can duplicate its DNA strand and split into two new cells in 20 minutes.
Now, imagine that someone pours an antibiotic into the petri dish. Many antibiotics kill bacteria by gumming up one of the enzymes that the bacteria needs to live. For example, one common antibiotic gums up the enzyme process that builds the cell wall. Without the ability to add to the cell wall, the bacteria cannot reproduce, and eventually they die.
When the antibiotic enters the dish, all of the bacteria should die. But imagine that, among the many millions of bacteria living in the dish, one of them acquires a mutation that makes its cell-wall-building enzyme different from the norm. Because of the difference, the antibiotic molecule does not attach properly to the enzyme, and therefore does not affect it. That one E. coli cell will survive, and since all of its neighbors are dead, it can reproduce and take over the petri dish. There is now a strain of E. coli that is immune to that particular antibiotic.
In this example, you can see evolution at work. A random DNA mutation created an E. coli cell that is unique. The cell is unaffected by the antibiotic that kills all of its neighbors. This unique cell, in the environment of that petri dish, is able to survive.
E. coli are about as simple as living organisms can get, and because they reproduce so rapidly you can actually see evolution's effects on a normal time scale. In the past several decades, many different types of bacteria have become immune to antibiotics. In a similar way, insects become immune to insecticides because they breed so quickly. For example, DDT-resistant mosquitoes evolved from normal mosquitoes.
In most cases, evolution is a much slower process.