A megapixel is a unit that describes the resolution of a camera or the images that that camera produces. It is equal to one million pixels, and is represented by the most basic element that comprises an image: a simple dot. The more pixels there are, the bigger the resolution of the image and the more times you can zoom in without ruining the quality of the image through pixilation or the enlargement of the pixels. Having more megapixels also mean having a larger file size.
Techopedia explains Megapixel (MP)
Megapixels are considered one of the most important features of a camera, but this measure is not the only important factor that determines image quality. Megapixels only determine how large the resulting image can be based on the total number of pixels. What actually determines the quality of images captured by a camera is the type and quality of the image sensor. The sensor makes the difference between a good 10-megapixel picture and a bad one.
The megapixel count determines how large the image can be printed without a loss of quality. For example, a 1.3 megapixel cell phone camera can take images that are good for printing of up to 4x3 inches. If the image is blown up beyond that size, image quality degrades dramatically.