Megapixels aren't the only things that play a role in image quality. The size of the camera sensor matters too. Different camera types (point and shoot, micro 4/3s, dslr, etc.) have different sensor sizes similar to how different film cameras had different film sizes (35mm, medium format, large format, etc.). I found an article that I've taken some inserts from that explains this in more detail.
Full article can be found here: http://www.digitaltrends.com/photography/image-sensor-size-matters/
When buying a digital camera, there are many important specs to consider besides which color to pick. In years past, the way you’d approach this was to get the camera with the highest resolution – measured in megapixels – you can afford. But, with many new compact point-and-shoots boasting the same resolution as their higher-end cousins, could they really perform at the same level?
The answer, of course, is no. The 16-megapixel resolution in Canon’s entry-level PowerShot A4000 IS doesn’t mean it’s stronger than Canon’s top-end PowerShot G1 X with a 14.3-megapixel resolution. There are many things that differentiate low-end from high-end, and one you should focus on is the sensor. A camera’s sensor is a highly sophisticated piece of component that captures light through small pixels (also called photosites) and turns them into a digital signal. (How they work is far more complex than our general description, but we know you have better things to do than sit down for a science lesson.) While a compact point-and-shoot sensor may have the same number of megapixels as that of a compact DSLR, they aren’t equal – it’s how big those pixels themselves are.
What sensor do you need?
For online sharing purposes, like e-mail or posting to a social networking site, small sensors in compact point-and-shoots and smartphones will do the job. But if you intend to use your photos for other purposes – whether it’s printing on paper, cropping an image, or publishing it in a magazine – know that cameras with small sensors may not deliver the image quality you’re looking for.
As we noted in our article on how to print large images the right way, resolution (megapixels) play a role in how large an image you can print (check out the article to find out how to determine the print size a particular resolution will yield). However, resolution, as we’ve already mentioned, doesn’t necessarily mean great image quality. If you plan to use your images for commercial purposes, invest in a full-frame or a high-end APS DSLR. For printing at home to share or display, check out entry-level DSLRs, CSCs, or high-end point-and-shoots that feature a large CMOS or CCD sensor.
Here is a chart to give you visual on sensor sizes from different camera types: