What is the practical advantage of disk brakes over rim brakes?
Working backwards from how it works:

Not using the rim means the brake is unaffected by how straight the rim is, and heating the rotor doesn't affect the tyre. The rim is not worn away by braking and the rotor material can be selected entirely for its suitability for that one purpose. This also allows smaller clearance between pads and rotor, allowing:

Increased pressure between brake pad and rotor compared to rim brakes means disks are less affected by water or other contaminants. Pads can be made of harder material giving increased pad lifetime.

Having the brake caliper further away from the tyre means it's less affected by mud, and it can be made partly or fully enclosed to further sheild it. The rotor is also less likely to  hit obstacles as it's further from the ground.

Being a hub brake makes unconventional designs possible. Single sided wheel mounts are the most obvious example, but some suspension systems are incompatible with rim brakes, and building a rim braked carbon composite wheel is much harder than building one to use a hub brake.

Disk brakes can also be fitted to both sides of a wheel for increased heat dissipation, and it's easier to vary the design for different characteristics (weight, heat capacity, modulation etc). Doing that with a rim brake means the brake manufacturer has to start selling wheels as well.

These combine to make disk brakes more reliable and easier to maintain.It's also somewhat easier to remove and reinstall wheels as you don't have to release the brake first.