What does a DNS server actually do?
A DNS server translates names people can remember into the numeric addresses machines actually use to route traffic. Every connection you make begins with a lookup, and if that lookup fails nothing else can happen, which is why DNS problems look like total outages even when the network is perfectly healthy.
The process is more layered than a single lookup suggests. Your device asks a resolver, usually run by your provider or a public service. If that resolver does not already know the answer it works down the hierarchy, asking the root servers which servers handle the top level domain, asking those which servers are authoritative for the specific domain, and finally asking those for the actual record. The answer is then cached at several points along the way.
Caching explains most of the behaviour people find confusing. Each record carries a time to live, and until that expires, resolvers and your own device will keep serving the stored answer. This is why a changed record can work for some people and not others for hours, and why lowering the time to live before a planned migration is standard practice.
DNS also does more than one kind of lookup. Beyond address records it carries mail routing, text records used for domain verification and email authentication, and aliases pointing one name at another.
Because it sits in front of everything, DNS is also a common place to apply filtering, whether for advertisements, malware or content policy. That is worth knowing when a site fails only on one network: the name may be resolving differently rather than the site being down.