A camera nowadays has three main components. A lens (or group of lenses) which focusses the image onto a sensor; and a case to keep extra light out.
Assuming your camera does not have zoom capability, the lens is a fixed distance from the sensor: light comes into the lens from the scene it’s pointing at, crosses over in the centre of the lens, and hits the sensor. (This means the image is presented to the sensor upside down and back to front).
We can use a combination of distances between the lenses in a group to zoom in, and to change the distance the lens is focussed on.
The Sensor is a rectanglular sheet which contains a number of “pixels” in a grid: each pixel can convert light into an electrical signal. In a mobile phone camera, the sensor is about 7mm across: so if you arrange it with 2688 pixels across the sensor, and 1520 pixels down the side, you have an area of just over 4 million pixels: “megapixels”. A 7mm sensor is 5.7mm across: divided by 2688 pixels means that each pixel is 0.0021mm across: 2.1 microns. This is considerably larger than all visible wavelengths of light: which means that each pixel can convert a few photons at a time into electrical signals.
Obviously, if you cram more pixels into the same physical space, each pixel is smaller.
The smaller the pixel, the fewer photons it can absorb at a time: and as you approach the wavelengths of visible light in pixel size, you might only be able to convert a single photon of, say red light at a time; but blue light you might take in 2 or 3. At these extremes of pixel capability, noise becomes a real factor.
If you look at a high quality DSLR camera, the sensor is 35mm across and might be 20 megapixels; or 5400×3600. 5400 pixels over 35mm is 6.5 microns per pixel: in other words huge. It can absorb a huge number of photons and eliminate noise almost completely.
In a DSLR camera, the front lenses are about 1″ across, with a whole array of smaller lenses behind to focus, zoom and direct the light onto the sensor. With lenses this large, modern manufacturing processes can make errors small enough that they are insignificant as a percentage of the lens’ size: this means that the lens doesn’t distort the image at all. A mobile phone camera however has a front lens about 1 or 2mm across… at this size, even tiny abberations in the lens’ shape have an effect on the image. It is therefore extremely critical to make these lenses as perfect as possible. This makes them expensive.
If we make the sensor larger, the sensor has to move back from the lens… otherwise the lens would only illuminate part of the sensor… or alternatively you can make the lens “wider angle” so that it illuminates the whole sensor at the same distance.
There are consequences to each approach: obviously moving the lens backward isn’t really happy news when you’re trying NOT to have camera bulges in a super-slim phone. Making the lens wider angle gets more of the scene into the camera but distorts the image: curving lines which appear straight to the human eye, and making things appear a lot further away than they are.
Observe this image:
In the upper image, using a narrow angle lens, the distortion isn’t enough to make the image look awful, but you photograph less of the scene.
In the lower image, using a larger sensor, you capture far more of the scene, but the image is badly distorted.
HTC tried with the One M7 and M8 to showcase the benefits of larger pixels: however they had a fixed distance to work with between lens and sensor, fixed space to work with inside the phone, and subsequently could only fit 4 million pixels into the 7mm sensor.
More modern phones have taken on board this whole “larger pixels” idea; iPhones have it, Samsung have tried it, and so on… but not QUITE as large as the One M7 and One M8.
The HTC U11 for instance uses 1.4 micron pixels, a lens which allows in more light, a slightly larger sensor, and a slightly narrower angle lens: 26.2mm as opposed to 28mm in the One M7. These combined factors make the camera far more effective with far more pixels than the M7 and M8 cameras were.