Pixels are what compose a camera’s image sensor. Pixels capture photons from the light projected on the sensor and convert those photons into your image.
The size of the sensor pixel determines its quality. The bigger the pixels on a sensor, the higher the image quality. If a full frame DSLR sensor and a smart phone sensor both boast of a 24mp (mega pixels) sensor, the image quality for the DSLR sensor will be of much higher quality.
Therefore image quality is not necessarily determined by the number of pixels on a sensor.