A geofence is a virtual boundary enforced by the drone's own software that stops it flying beyond a set distance, outside a defined area or above a set altitude. When the aircraft approaches the boundary, it stops or refuses to fly further.
A geofence is distinct from geo-zones (airspace rules) and from geo-awareness (warnings): the geofence physically limits the aircraft rather than merely informing the pilot. Keep it active unless there is a solid operational reason not to.