A picture is a list of numbers.
Each pixel is one colour sample, usually four bytes: red, green, blue and alpha (opacity). This 64 × 40 image is 2,560 pixels, so 10,240 bytes in memory. Click any pixel to read its bytes and where they sit in that list.
An image pixel is a stored sample. A device pixel is a physical dot on the panel. A CSS pixel is a layout unit that browsers keep near 1/96 inch at arm's length, whatever the panel. Zoom the page and the numbers below update.
A 3 MB JPEG and a 30 MB PNG of the same photo both open into the same grid. To edit or show it, software unpacks every pixel at its full size. Pick a pixel layout to see the memory each resolution needs once opened.
One megapixel equals one million pixels. A 12MP camera captures 12 million individual pixels per photo.
A pixelated image has been enlarged beyond its resolution so individual pixels become visible as blocky colored squares.
AI upscaling tools can intelligently add pixels, but traditional enlargement just stretches existing pixels resulting in blurriness.
For print quality, you need 300 DPI (dots per inch). An 8x10 inch print needs 2400x3000 pixels minimum.
Pixel density (PPI - pixels per inch) measures how tightly pixels are packed on a screen. Higher PPI means sharper images.