You don't need a credit card for an Apple account to use with iTunes, your iMac, MacBook, PC, and iOS devices (iPhone, iPad...) But you'll need a credit card for any purchase without an iTunes gift card. From that point on, this credit card will automatically be used for iTunes purchases or recurring subscriptions, like Apple Music or iCloud storage. I'll show you how to change credit card or update its expiration date, straight from iTunes on Windows or Mac OS X.
Once in iTunes, click on the Store menu and select View Account near the bottom. Notice that it shows the user name under which you're logged in.
If iTunes asks you for a password, confirm that the correct email address shows on the left, and type your password on the right. Click "View Account".
The next screen shows all your account information. Under Apple ID Summary, the type of credit card (Visa, MasterCard, etc.) and its last four digits are displayed. If you want to change it, click on the Edit link on the right.
Apple currently accepts four types of credit cards: Visa, MasterCard, American Express, or Discover. If you want, click PayPal to pay your iTunes purchases via PayPal. Or click None to remove the current credit card on file from your iTunes account (a recently added option, which is welcome!) Make sure that your billing address matches your credit card, and click Done at the bottom.