In double slit experiment, when electrons are shot through two slits without a measuring device, they behave like an interference pattern. Even if electrons are shot one by one like marbles, which should create two patterns as marbles do, they interfere with themselves and the result shows an interference pattern.
This changes when a measuring device is put by a slit to see which one of the two slits each one actually goes through. Just as if electrons knew that they were being watched, they now acted as marbles do, and created the two-pattern result.
Watch animated Dr. Quantum explaining the experiment: