Supply and demand just like every other market.
No one can predict markets. People trade because they want stuff. Enterprises are either able to fulfill those demands and remain profitable or they don't and are forced to liquidate so that an other enterprising opportunity might be made available for someone else--provided the business in question isn't being protected from competition.
What certain markets decide as a medium of exchange is immaterial to the market in general...but let's assume that the exchange is going to be carried out with something that has value.
1) People must have a demand for the exchange medium itself--the dollar in this case.
2) The exchange medium has to remain relatively stable in value or else people will lose trust in its desirability as an exchange medium.
What this means: It doesn't matter what is traded; oil could be exchanged with tobacco if people had a large enough demand for it and the value remained stable; i.e., people weren't inclined to quit smoking in large proportions.
I gather by your question you have no idea "how the foreign exchange markets work" either since you didn't offer anything but a question.
Do you understand supply and demand?