How do visitors from foreign countries with capital controls get dollars to buy things in the United States and pay for their trip (lodging, entertainment, etc)? For example, I read that tourists from China spend billions in the United States. I thought it was very difficult to convert Yuan into dollars. How do they get the US currency they need to go to Disneyland or whatever?
It is not difficult to convert RMB to USD. I've done it before and it's as simple as walking into my bank and placing a currency order. I'd imagine if a tourist can afford to pay for tickets/visas/etc. to enter the US, they can also convert currencies. Not to mention, you can pay with a credit card just about anywhere in the world now-a-days - so you don't necessarily need cold hard cash to "go to Disneyland or whatever".
If you're asking specifically for China then I think you have a huge misunderstanding about the relation between CNY and USD. Despite the FX control policies (mostly aimed at huge amounts of capital outflow), everybody has a yearly allowance of 50K USD which allow them to use RMB to buy FX (USD, EUR etc.) in the Bank of China. Also you can apparently shop with credit card as well and even directly withdraw USD (from your Chinese bank account) at ATMs of American banks which support UnionPay. Some Chinese online payment providers like Alipay are even reaching out into western markets and offer Chinese consumers the convenience of directly paying using their systems when shopping in a mall. So spending in the US would never be a problem for Chinese customers.
If you're asking about any country that might have such an issue with USD then I'd say your question is likely too broad. Specific circumstances might apply to each case.