Rabbi means “great one” in Hebrew, or “respected one”. It’s a Hebrew word related to the Arabic word rabb, meaning “lord.” Saying “Rabbi” showed respect, like calling someone “Sir”. In early Jewish history, there were no rabbis. There were only priests in the temple who organized ceremonies and sacrifices. Around 50 AD, people began to call wise men like Gamaliel by the title Rav or Rabban, to show that they were leaders and teachers. Just a little later, Matthew, Mark, Luke and John used the same word as a title for Jesus in the Gospels.
In 70 AD, the Roman general Titus destroyed the temple in Jerusalem. Without a temple, the Jews stopped offering sacrifices to their god. So they stopped having priests. Instead, rabbis, or teachers, became their religious leaders, at least until the temple is rebuilt. During the time of the Roman Empire, you became a rabbi by studying the Torah (the Bible). Then you got smicha (you were ordained) by the council of the Sanhedrin. They were in charge of Jewish religious business. A rabbi met with his followers in a synagogue. That’s a Greek word meaning a place where people come together (like English “synthesis”)
In 425 AD, the Roman empress Pulcheria ended the Sanhedrin, because she wanted everyone to be Christians. After that, you became a rabbi by studying and then getting smicha from the rabbi who had been your teacher. Some famous rabbis of the Middle Ages were Maimonides, who lived in Cairo, in Egypt, and Rashi, who lived in France.
Bibliography and further reading about the history of Judaism: