Programs running graphically (Firefox, your file browser, etc.) need a way to tell the system "draw these pixels here". That's what the display server does; it takes all these applications, works out where their windows are and manages that pixel data.
XOrg has historically been the display server in common use, but it's very old and very cobbled together. It generally struggles with "modern" things that must people expect today. Multimonitor setups, vsync, hdr and all that. They work, but support is hacked together and brittle.
Wayland is a replacement for XOrg that was designed from scratch to fix a lot of these issues. But it's been an uphill battle because XOrg is the final boss of legacy codebases.
tl;dr They're both software that manages drawing pixels from applications to the display.