In the 1860s, the Province of Canada had various political problems, including ministerial instability. The colony was also suffering economic difficulties with the end of the Reciprocity Treaty with the USA. These problems and several others pushed the representatives of the British colonies in North America to consider different possible solutions. With this in mind, the delegates formed the Great Coalition, and the idea of a federation began to take shape.
The delegates met for three different conferences. After these meetings, the Dominion of Canada came into being in 1867 by virtue of the British North America Act (BNA Act). This constitution brought the following territories together in a federation: New Brunswick, Nova Scotia and United Canada (Quebec and Ontario).
To learn more about the Canadian Federation, read the following concept sheets:

The Quebec Conference in 1864