A depth buffer, also known as a z-buffer, is a computer graphics technique used to determine which objects, or parts of objects, are visible in a scene and which are hidden behind others. It stores depth information for each pixel to ensure correct rendering order, enhancing the realism of 3D graphics by properly handling occlusion and perspective effects.