When you have finalized the content of layers, you can merge them to reduce the size of your image files. When you merge layers, the data on the top layers replaces any data it overlaps on the lower layers. The intersection of all transparent areas in the merged layers remains transparent.
In addition to merging layers, you can stamp them. Stamping allows you to merge the contents of more than one layer into a target layer while leaving the other layers intact.
For more information on clipping masks, see Mask layers with clipping masks.
When you stamp multiple selected layers or linked layers, Photoshop creates a new layer containing the merged content.
Flattening reduces file size by merging all visible layers into the background and discarding hidden layers. Any transparent areas that remain are filled with white. When you save a flattened image, you cannot revert back to the unflattened state; the layers are permanently merged.