If you have Uber Cash on your account, it can be automatically applied to trips and cancellation fees. You can see how much you have on your account in the Wallet section of the app.
You can switch your payment method during or after a trip.
If your trip price is greater than your Uber Cash balance, your selected payment method is charged the remaining balance.