Various aboriginal peoples had inhabited what is now Canada for thousands of years prior to European colonization. Beginning in the 16th century, British and French claims were made on the area. The colony of Canada was first established by the French in 1535 during Jacques Cartier's second voyage to New France.  Great Britain gained and lost territories within British North America until it was left, in the late 18th century, with what mostly geographically comprises Canada today.

Pursuant to the British North America Act, on July 1, 1867, the colonies of Ontario, Quebec,  New Brunswick, and Nova Scotia joined to form the semi-autonomous federal Dominion of Canada. This began an accretion of provinces and territories to the mostly self-governing Dominion to the present ten provinces and three territories forming modern Canada.

More Info: en.m.wikipedia.org