With a phone, almost always: WeChat Pay or Alipay, both of which accept international cards. Install both before you leave home, while your own number and your own bank are still within reach — doing it after you land is where people get stuck. If you also want a plastic card, UnionPay is accepted far more widely than Visa, and Visa more widely than Mastercard.
Set it up before you fly
Both apps work with foreign cards, and both are considerably easier to register at home than on arrival: the verification message reaches your normal number, and if a card is refused you can call your bank while you are still in the same country as your bank. That is the whole trick. It takes minutes in your own kitchen and can take an afternoon at a hotel desk in Chengdu.
Cash and cards
China has essentially moved past cash — day to day, almost everything is paid by phone. Cash is still money and still accepted, so keep a small amount for the rare counter that wants it, and for the valleys where a signal drops. I would not arrive with none.
Cards are the reverse story: they work, but less often than you expect. Where they do, acceptance runs UnionPay, then Visa, then Mastercard — which is the opposite order to most people's wallets.
If you want the step-by-step
That is now its own page: How do I pay in China? — the order to do things in before you fly, what each app actually asks of you, and the fallback app to try when a foreign card refuses to link at all.
One more thing worth knowing, and it is on that page too: Google and many Western apps do not run in China by default. That is a solvable problem rather than a crisis.
Questions I get on this one
Do I need a Chinese bank account?
Do I need to bring cash?
Can I just use my credit card?
Will my phone even work here?
From paying for things here every day, not from a bank's leaflet. Related: language · visas and entry · all essentials