A 3D texture is a texture in which each mipmap level contains a single three-dimensional image. A 3D texture is essentially just a stack of 2D textures that can be sampled with x, y, and z coordinates in the shader. This functionality allows us to have multiple 2D textures in a single object so that shaders can seamlessly select which image to use for each object.
This is useful for visualizing volumetric data (like medical scans), 3D effects like smoke, storing lookup tables, and so on.