The ANSI Standard X4. 13-1983 is the system most commonly used by card companies.
The breakdown of the credit card:
3 signifies Travel and Entertainment cards
4 represents Visa
5 represents MasterCard
6 is Discover Card
The Bank Number is the entire string of digits minus the very last digit
The magnetic stripe is often called a magstripe. It contains small iron magnetic particles in a plastic film. Terminals, registers, etc. can read the information on the magstripe. When the magnetic strip is dirty or scratched, it can be more difficult for terminals to read the stripe.
There are 3 tracks on the magnetic stripe.
Your credit card typically only uses track one and two. Track three includes an encrypted pin, country code and currency units)