This is the easiest and most economical way to pay, the rate being better than if you do the exchange on the spot. Have your passport with you, it is sometimes required. The most common cards are Mastercard, Visa, and of course American Express, which charge very low commissions.
The secret code is not used in the USA, so you must sign for each transaction. In the USA, a credit card is an essential tool, almost a necessity, Americans pay everything by card, even for 5$!