NASA's Hubble Space Telescope has captured a rare cosmic moment: a comet breaking apart in real time.