This term refers to the size of an image, usually in reference to a photo from a digital camera or camera phone.
A megapixel means one million pixels. The resolution of digital cameras and camera phones is often measured in megapixels. For example, a 12-megapixel camera can produce images with 12 million total pixels.
Since pixels are usually square and form a grid, a 1-megapixel camera will produce an image roughly 1200 pixels wide by 900 pixels high.
A high number of megapixels matters most when zooming in or cropping a photo. For example, some phones let users "zoom in" without losing quality, without an optical zoom lens. They do this by simply cropping an 8-megapixel photo from the center of the original 23-megapixel image captured by the camera (for example.)
Photos with more megapixels have more detail, but are larger in file size, and therefore can take longer to transfer or send, and take up more storage space.
Most cameras and camera phones have an option to take photos at lower resolution (smaller), if desired. This can be useful for saving storage space.