The technological singularity will occur as artificial intelligence (AI's) surpass human beings as the smartest and most capable life forms on the Earth. Technological development will be taken over by the machines, who can think, act and communicate so quickly that normal humans cannot even comprehend what is going on. The machines will enter into a "runaway reaction" of self-improvement cycles, with each new generation of A.I.s appearing faster and faster. From this point onwards, technological advancement will become explosive, under the control of the machines, and thus cannot be accurately predicted (hence the term "Singularity").
The Singularity will be an extremely disruptive, world-altering event that will forever change the course of human history. The extermination of humanity by violent machines will be unlikely (though not impossible) because sharp distinctions between man and machine will no longer exist thanks to the existence of cybernetically enhanced humans and uploaded humans.
Kurzweil, Ray. 2005. The singularity is near: when humans transcend biology. New York: Viking.