The consequences of when machine intelligence exceeds our own has been the fodder for fiction, from Terminator to Robopocalypse. But maybe it will play out like the ending of the recent Spike Jonze movie, Her. (Spoilers in the "Plot" section of the Wikipedia entry.) Or maybe the fun WWW Trilogy.
MIRI is one of the groups doing insightful work in preparing for the coming rise of machine intelligence. If you are interested in their work, they are having a summer matching challenge for a few more days.
PS -- if you know a Wikipedia editor, let me know. Thanks!