In digital photography terminology, resolution is a measure of the number of pixels there are on a sensor. The resolution of digital cameras is measured in “megapixels” – millions of pixels. It works by a simple bit of maths – multiply the number of pixels along the bottom of the sensor by those up the side. For example, a sensor with 3000 pixels along the bottom, and 2000 up the side equals 6,000,000 pixels in total. That would make it a 6 megapixel camera.
Theoretically it is possible to change the sensor in a digital camera (say, to upgrade a 5 megapixel sensor to a 10 megapixel sensor). In practice though, so much of the camera would have to be replaced it makes this impossible to do.
Glossary of Digital Photography Terminology – http://www.digital-photography-tips.net