
Stable Diffusion uses a process called denoising diffusion — it learns to generate images by learning how to reverse the process of adding noise to images.
SD doesn't work on full-resolution pixels — it works in a compressed "latent space" 8x smaller. This is what makes it fast enough to run on consumer GPUs.
Reference:
TaskLoco™ — The Sticky Note GOAT