Construction and commissioning of the cubic-kilometer IceCube neutrino detector and its low energy extension DeepCore have been completed. The instrument detects neutrinos over a wide energy range: from 10 GeV atmospheric neutrinos to 10 10 GeV cosmogenic neutrinos. We will describe initial results based on a subsample of the more than 300,000 neutrino events recorded during construction. We will emphasize the measurement of the high-energy atmospheric neutrino spectrum and the search for the still enigmatic sources of the Galactic and extragalactic cosmic rays. Most importantly, we will discuss how the first data taken with the completed detector have revealed a flux of extraterrestrial neutrinos.