Indigenous people had lived in the area that was Toronto for thousands of years. In 1793, British officials negotiated the Toronto Purchase with indigenous people. The first city created on that area was called the Town of York, named after Prince Frederick, Duke of York and Albany, which was designated as the capital of Canada.
The town was raided in the Battle of York, during the War of 1812, by US forces. The population first had a large population increase when the Great Irish Famine caused many Irish immigrants to move into the city. York was renamed to Toronto in 1834, and it became the capital of Ontario in 1867. In the late 1800s, an extensive sewage system was constructed, and a few decades later, it became the largest alcohol distillation center in North America.
In 1954, the city of Toronto and 12 surrounding municipalities were combined into a regional government. The postwar economic explosion caused a shift to the suburbs. In 1967, the seven largest municipalities of Metropolitan Toronto were merged into a six-municipality configuration that included Old Toronto, East York, North York, York, Etobicoke, and Scarborough. In 1998, all six municipalities were coalesced into one large city, Toronto, the largest city in Canada.
Now, why is Toronto called the 6?
So, that's why some people, most famously, Drake, call Toronto "the six", due to its previous six municipalities. Some people say that that nickname is derived from the two area codes, 416 and 647, but there are conflicting sources as to which one, geography or area code, is the origin of the nickname.
See also: Who is Pablo in "The Life of Pablo"?