...In total, the telescope took 342 pictures of the region, each of which was exposed for between 25 and 45 minutes. The images were processed and combined, then colored, and 17 days later, released to the public.
1. You put the telescope on a motorized mount that rotates the telescope exactly counter to the rotation of the Earth (or I guess its orbit in the case of Hubble). This cancels out most of the blurry star trails you get from the Earth's rotation causing the stars to move across your frame.
2. For particularly long exposures, you take a series of separate photos (each of which is probably done using step 1). Then you "stack" those in software by aligning all of the images to maximize their sharpsness. There is software that will do this for you automatically. Stacking helps correct for thermal noise and other imperfections and non-linearities that photon sensors have when collecting for a really long time.
It's a good question.
The motion of Hubble (and basically everything inside the Milky Way) relative to the galaxies in that picture is ~250,000 km/s, or 0.83 c.
At this speed, it would take ~100,000 years for the galaxy to move its own length, and even then the movement would be in a direction which doesn’t cause much blur.
http://www.wolframalpha.com/input/?i=12e9%20light%20years%20...