The electoral system is almost exactly the same as UK system. It is called unofficially "First Past the Post" system. Your comment very topical, because the newly elected Liberal Party have "sworn" to end it. Possibly for proportional representation. Big debates going on now.
Canadians vote locally for a candidate of a political party. That winning party has already picked out a leader. A small meeting of a few hundred members decides who leads. If that party wins the general election- that leader gets to be Prime Minister. He or she has only to win election only in their own district. I have never been able to vote for or against a Prime Minister elect in 60 years of voting.