With recent advances in nanophotonics and nanofabrication, considerable progress has been achieved in realizations of thin composite layers designed for full absorption of incident electromagnetic radiation, from microwaves to the visible. If the layer is structured at a subwavelength scale, thin perfect absorbers are usually called "metamaterial absorbers," because these composite structures are designed to emulate some material responses not reachable with any natural material. On the other hand, many thin absorbing composite layers were designed and used already in the time of the introduction of radar technology, predominantly as a means to reduce radar visibility of targets. In view of a wide variety of classical and new topologies of optically thin metamaterial absorbers and plurality of applications, there is a need for a general, conceptual overview of the fundamental mechanisms of full absorption of light or microwave radiation in thin layers. Here, we present such an overview in the form of a general theory of thin perfectly absorbing layers. Possible topologies of perfect metamaterial absorbers are classified based on their fundamental operational principles. For each of the identified classes, we provide design equations and give examples of particular realizations. The concluding section provides a summary and gives an outlook on future developments in this field.