The card security code is an anti-fraud security feature to help verify that you are in possession of your credit card.
For Visa/Mastercard, the three-digit number is printed on the signature panel on the back of the card immediately after the account number.
For American Express, the four-digit number is printed on the front of the card above the card account number.
Visa/Mastercard
American Express