I just wish Hubble took color images. They spend a lot of time coloizing those images in the most dramatic ways possible. On an image like this you can really see the 'paint'.
http://hubblesite.org/reference_desk/faq/answer.php.id=93&cat=topten
It looks like they don't "colorize" them any more than the Mars Exploration Rover team does, and they can produce normal color images.
The MERs use B&W cameras too, but in front of each Pancam is a filter wheel. If they want a basic color image, they get three photos, one of each through a red, green, and blue filter. They're then calibrated and combined to get a good color image.
But human vision is pretty pathetic though when it comes to versatility in the EM spectrum, so the scientific community will use other wavelengths when possible.
Here's a nice PDF on the MER cameras. Page 9 shows the filter wheels. There are some there in the visible range, and also a lot of infrared filters.
Having separate channels also makes it possible to "stretch" colors for enhanced visibility.
Combination of filters, including some near-IR.
Stretched colors.
Then if you get into the longer-wavelength IR filters, additional details can start to show up which don't show up in visible wavelengths.
Many full-color Hubble images are combinations of three separate exposures — one each taken in red, green, and blue light. When mixed together, these three colors of light can simulate almost any color of light that is visible to human eyes. That’s how televisions, computer monitors, and video cameras recreate colors.
So it's not much different than the fake colors you're seeing on your monitor. Your monitor isn't capable of showing you anything other than red, green, and blue light, but I'm sure you can see yellow and white sections on it right now.
A proper RGB color image.
Approximate natural-color image? The colors on this one.....IR for red, orange for green, and blue for blue. Stretchy. It's possible it was calibrated to get it to look close to how it'd really look to a person.
Better approximation. 390nm blue, 475nm green, 600nm red.
Approximate true-color image. "The new image of V838 Mon, taken in October 2004 with Hubble's Advanced Camera for Surveys, was prepared from images obtained through filters that isolate blue, green, and infrared light. These images have been combined to produce a full-color picture that approximates the true colors of the light echo and the very red star near the center."
So again, it's not the normal human-eye red/green/blue filters, but they can do quite a bit with what they have to tease out some reasonable colors.
Either way, it's not like they're colorizing them with MS Paint and an airbrush.
The fancy colors you get in some images are because they're not spending money to take pretty pictures for backgrounds on phones and PCs, but because they're spending money to get pictures that emphasize scientific value. That sometimes means leaving behind the limitations of our eyes.
In some ways, Hubble has better vision than any human.
"The Wide Field and Planetary Camera 2 aboard the Hubble Space Telescope has 12 filter wheels, each of which holds four filters."
Our eyes only have three filters.
Here we go, this PDF shows the color options available. (Page 9)
And anyone thought that the mantis shrimp's 12-cone vision was impressive?
As for the Andromeda image...
This view shows the galaxy in its natural visible-light color, as photographed with Hubble's Advanced Camera for Surveys in red and blue filters July 2010 through October 2013.
Looks like they didn't use the green filter.
They can do some impressive interpolation to try to fill in the gaps though. (Just like your eyes can tell you that red+green = yellow.

)