The same way the gold standard worked over a century ago, just with the USD instead of gold. You can take a Dirham, hand it over to a UAE entity (Like the government or central bank), and they will give you a fixed amount of dollars in return.
There are plenty of issues that can come from this. But as long as the UAE has enough dollars, or resources they can easily exchange for dollars, they can do this.
Problems arise if the UAE can’t fulfil that promise. At which point their currency will be subject to market forces and the peg will be “broken”. Usually to the detriment of the UAE as people no longer trust in the value of their Dirham.