A DMZ (Demilitarized Zone) acts as a buffer zone between the public internet and a private network. It allows controlled access to public-facing services while isolating the internal network from direct exposure, enhancing security by limiting the impact of potential breaches.