A detent is a generic term used to mean a device, mechanism (in this case, a pin) which essentially keeps another part from moving, forces it to move in one direction, or holds one part in place.

The AR-15 has several detent pins (and detent springs) to allow the firearm to function properly. For example, in the lower parts kit, you’ll find: