Generally games rely on a spatial tree of some kind.
For terms you can research: spatial hash, BSP trees, quadtrees, loose quadtrees, octrees, loose octrees. Each is progressively bigger in implementation but generally more powerful.
* A spatial hash is typically a manual subdivision based on what you provide. You manually specify how many divisions are used.
* BSP trees are generally better for linear data or where you need arbitrary slices. These can be manual or automatic.
* Quadtrees and their variants usually operate along axis-aligned boxes in 2D, automatically subdividing as needed based on rules you provide. This works well in many games when you can use ground coordinates.
* Octrees and their variants are like Quadtrees, except in 3D. Usually overkill for games unless you're working on games with true six degrees of freedom.