How did they take photos of Jupiter?
You can see Jupiter in the night sky with your naked eyes due to its reflected sunlight (although I believe that in July and August of 2014 Jupiter is very close to the Sun in the sky and is visible only for a little while near twilight). You can take a picture of Jupiter in the sky with any old camera.
If you want a high-quality picture, your camera needs to have a lens arrangement that will make the image of Jupiter on the camera's CCD larger than the image of Jupiter on your retina. The thing to look for is a lens with a long focal length. If the focal length of the lens1 is long enough, it will need to stand some distance away from the camera's CCD on a rigid mount; this is usually called a telescope. You can replace the camera with your eye and see Jupiter's cloud bands directly.
1Actually most telescopes use a curved mirror rather than a lens, for several technical reasons.
Images as nice as that one usually come (possibly) from professional astronomical observatories on the ground, or from the Hubble Telescope, probably NASA's most successful instrument ever (after a rocky start). Your particular image seems to have been taken by the robotic spacecraft Cassini when it passed near Jupiter en route to Saturn, where it has been orbiting and collecting data for the last ten years. In that case the camera had the advantage of being much closer to Jupiter than I'll ever be :-(
This was just going to be a comment, but it got too long.
Technically the picture is a fake. It's actually a composite image of what we would see with our eyes (visible light) blended with light seen in 3 different filters (see this NASA article on the different filters on-board Cassini, the probe that took the images).
The image below is taken from the first link. The visible light image is on the left; this is what we would see if we were located where Cassini was when it took the image. The image on the right is the composite image (consisting of 2 Methane filters (around 750 nm and 890 nm) & 1 Red continuum filter (likely around 645 nm), source)
The light that shines on Jupiter is of course the Sun's. It is indeed fainter than on Earth, by a factor of about 25, but that is still plenty. Using appropriate cameras, and long enough exposures, one can photograph much fainter targets.
You can also note that there is a moon transiting in that picture, and its shadow is clearly visible. This should help you understand that the light source that's creating that shadow must be very far away. The only thing that could possibly do that is the Sun.