On the main iTunes store page, over on the right, there's a link for "Redeem." Enter your gift card info there, and the money will be added to your account. When you purchase the software upgrade, it will use this first, and then charge any remaining balance to your debit/credit card on file.