A digital photograph is actually a computer file. There are several different formats, but they are all a series of ones and zeroes which are loaded into the random access memory of a computer, alongside a program which will edit the file.
If the computer has enough memory, multiple copies of the file may be stored in the RAM assigned to the editing program. Each of these copies can be presented to the user as a "layer", with each layer being one of a stack which are superimposed above each other, like sheets of glass on which the image is "painted".
Layers can also contain selections (ie specifically chosen parts ) of the original image. Layers may also contain completely different data which the editor can superimpose on the original. For instance , a text layer containing a title.
Layers can be made transparent, either partially or entirely, (as if the glass sheet was smoked, or frosted), or transparent in selected areas. That allows one layer to reveal parts of the layer below.
The advantage of using layers is that the original image may be left untouched, while complex changes are built up "above" it. A frame can be added. Text can be added. Selected areas may be brightened or darkened. Bits of completely different images can be added.
At the end of the process, the layer stack can be "flattened", producing a single layer image (usually a JPEG), which can be exported for use as a new image file. The original file is untouched, but three files now may exist instead of one-
1.The original raw or jpeg file.
2.The final output file (probably a JPEG).
3. The multi-layered file, preserving all the layers and changes. This will be in the native format of the editor software, often a PSD (Photoshop) file, or an XCF (GIMP) file.
Use of selective transparency and edge sharpness lets layers be used to create "focus stacked" images to enhance depth of field. This is especially useful in macro work.
Photoshop uses layers. Lightroom does not.
GIMP uses layers. Darktable does not.
So Lightroom and Darktable are of more use to photographers, while Photoshop and GIMP are aimed more at designers.
