Octree
A tree that splits 3D space into eight boxes again and again, so you only test objects that actually sit near each other.
Each node is a cube with eight children — one per octant. Objects drop into the smallest cube that contains them, and a query against a region need only visit the cubes it intersects. Depth adapts to density: empty stretches of the world stay shallow.
The structure powers collision broad-phase, frustum culling, and the storage of voxels (as in Minecraft-style worlds) and point clouds. The two-dimensional counterpart is the quadtree; choosing between them is simply a question of how many axes the world needs dividing along.