He went to Medina, this event is known as the hijra and he embarked on said journey in the year 622. Which on the Muslim calendar, is year 1. However, what is of particular interest is that the city is also referred to as Yathrib and "Medina" means "The city" when translated to English.