Your credit card number actually contains quite a bit of information, if you know what your looking for.  For starters, the first digit in the number indicates what type of card you’re dealing with. This number is always a 3, 4, 5, or 6, and can be interpreted as follows:
3 = Travel or entertainment card (e.g., Amex or Diner’s Club)
4 = Visa Card
5 = MasterCard
6 = Discover Card
Visa credit card numbers
For Visa cards, the numbers are 16 digits long. Visa has used to have 13 digit numbers, as well, but those have been mostly (completely?) migrated over to the 16 digit format.
When looking at the balance of the numbers, the 2nd through 6th digits are the bank number, and the 7th-15th numbers are your account number. The remaining digit is known as the “check digit,†which is used to help determine whether or not the overall number is legitimate.
MasterCard credit card numbers
For MasterCard cards, the number is also 16 digits long. The first digit is always a 5 and the second digit is always between 1-5. The 2nd-3rd, 2nd-4th, 2nd-5th, or 2nd-6th digits correspond to the bank number, and the remaining digits up through the 15th are the account number. As above, the 16th digit is the check digit.
American Express card numbers
For American Express cards, the number is always 15 digits long and it always starts with 34 or 37. The 3rd and 4th digits indicate the card type (business vs. personal) and the currency. The 5th-11th digits are the account number, the 12th-14th digits are the card number associated with the account, and the 15th digit is, once again, the check digit.