Atomic number is equal to the number of protons in the atom whereas mass number is equal to the total number of protons and neutrons.
As isotopes differ in the number of neutrons but have the same number of protons, so they have same atomic number but different mass number.