An isobar has
same number of nucleons but different number of protons.
Atoms having same atomic mass and different atomic numbers are known as Isobars.
Since mass of an atom is the mass of neucleons and the atomic number is the number of protons in it, therefore, Isobar has same number of nucleons(atomic mass) but different number of protons(atomic number).
For example: Argon and calcium. Both the elements have same atomic mass equal to 40 but different atomic numbers, i.e. argon has atomic number equal to 18 and calcium has atomic number equal to 20.
Argon:
Number of protons: 18
Number of neutrons: 22
Number of neucleons: 40
Calcium:
Number of protons: 20
Number of neutrons: 20
Number of neucleons: 40