In 1935 Reza Shah told foreign delegates to his nation to use the name Iran, the name used by the natives, instead of Persia. Eventually the name Iran became more popular than the name Persia.
There were/are a number of different Iranian peoples: Medes, Persians, Kurds, Parthians, Pashtuns, Sogdians, Ossetians, etc. Several of these peoples ruled empires encompassing many other Iranian and non-Iranian peoples; but the most significant such empire was that of the Achaemenid Persians (founded by Cyrus the Great and overthrown by Alexander the Great).
Later Iranian peoples that rose to prominence saw themselves as the successors of the Achaemenid Persians, in much the same way that various medieval European states saw themselves as the successors of the Roman Empire. They were often referred to by themselves and others as “Persians”, and the Iranian plateau continued to be known as “Persia”. But the Persian people (now called Farsis) continued to exist as a distinct group among the larger set of Iranian peoples, so in the 20th century the name was changed to “Iran” in order to be more inclusive.
(Ironically, the actual Achaemenid Persians, when they expanded from being the kings of Persia to ruling a multiethnic empire, changed their own title to “King of Kings of Iran and non-Iran” for much the same reason.)
Originally the Assyrians used the name for an unknown reason that linguists are still disputing. But what we do know is that the Greeks are the first western people to use the name. This was due to the Greeks confusing the region of persus (part of modern day Iran) for all of Iran. The Greeks created a word for 'people of persus', still thinking that persus was the whole of Iran, and that word is 'persian' today. Later after the Iranian revolution, the Iranian government mandated that they be further known by their real name, 'Iran'.