An autoencoder is a specific type of neural network used for unsupervised learning. It is composed of two main parts: an encoder and a decoder. The encoder compresses the input into a latent space (as described above), and the decoder then reconstructs the input data as closely as possible from this compressed representation.