A DMZ serves as a buffer zone between a company's internal network and an external network, like the internet. It isolates sensitive services from direct exposure to the internet while allowing controlled access to them.