The first digit of the number is the Major Industry Identifier. ( 1/2 are for airlines, 3 is for travel/entertainment, 4/5 for banking and financial, 6 for merchandizing and financial, 7 for petroleum, 8 for telecommunications. 0 and 9 are for other assignments and unlikely to be used.)
The first six digits together will correspond to the issuer, including the major industry identifier. 34xxxx/37xxxx are for American Express, 4xxxxx is for Visa, 51-55xxxx is for MasterCard, and 6011xx is for Discover.
The rest of the digits (except the last one, which is a checksum digit) is the actual customer account number.