An autoencoder is a type of artificial neural network used to learn efficient codings of unlabeled data, typically for the purpose of dimensionality reduction. It works by compressing the input into a latent-space representation, and then reconstructing the output from this representation, aiming to match the original input as closely as possible.