In a nutshell
An autoencoder is a network trained to copy its input to its output through a narrow middle layer. The encoder compresses the input into a small latent code (the bottleneck); the decoder rebuilds the input from that code. Because the code is far smaller than the input, the network can't just memorize — it must learn the data's essential structure, which makes autoencoders useful for compression, denoising, and unsupervised feature learning.