For Visa, MasterCard, and Discover, the security code (or CVV) is a three digit code located on the back of your card:
For American Express, the security code is a four digit code on the front of your card: