For this example we will be assuming the sitting government is defeated.
In Canada, at least until a few years ago when "fixed election dates" became common, the sitting Government can call the election whenever it pleases. Nova Scotia, without fixed election dates, still operates this way.
At some point, the Premier of Nova Scotia will decide to call an election. Usually when this happens there is between a few days and a few weeks of lead time. This is after the decision has been made, in private, but before the election has been announced publicly. In Nova Scotia elections must be on a Tuesday, and, the election period (also known as the writ) must be at least 30 days long. If an election is called on a Sunday, the writ period is exactly 30 days long as minimum, but if called on a Saturday, because of the Tuesday rule, the period would be 31 days long. For this reason it is usually decided a few days before an election is called, as there is a need to wait for the proper "day of the week" to make the call if, as is usual, the shortest possible election period is to be used.
This period of a few days can unofficially be thought of, in the context of some other nations, as the start of the caretaker period.
Once the writ is dropped, the election act comes into full force, and an election officially begins.
Election day will see no campaigning, and ballot booths are open for, usually, roughly 12 hours, closing somewhere around 8pm. Once the booths close, election results coverage begins. Ballots are counted in place, with each polling location locking the doors and physically counting the ballots. As there can be hundreds of polling booths in each constituency, they will report their results at different times, as such, the results slowly roll in over the course of hours with more and more of the results becoming available. Generally by midnight, the results are clear; but this is midnight local to the count, which can be 4:30am in some parts of Canada federally as Canada consists of multiple time zones.
Following this, results are officially validated. Federally this can take up to 2 weeks, roughly. It should be noted that of all the elections since the end of WW2, never has the total whole result of a general election (as in who has 'won' the government) changed during this period. The closest is in 1972 when two ridings in BC were showing leads by the Tories (that is, the polling booths that had been counted indicated more votes for the PC Party) but by sunrise the next morning, both had, in fact, been won by the Liberals.
If a government is defeated, a "transition" period begins. The government that was defeated remains in office during this time. Generally, this period takes roughly 2 weeks, but can be longer or shorter pending the wishes of the incoming leader.
While coalitions are rare in Canada, if there were to be a coalition, it would be negotiated during this transition period. Canadians would generally expect that within 3 or so weeks of the election, the new government would be fully in place.
On that date, the new Premier/Prime Minister is sworn in alongside his or her cabinet, which has been chosen during that 2 week transition period.
Parliament, or the Legislature as the case may be, will then meet and government will begin. How long this takes can vary wildly. Generally, houses only meet during the spring and fall, so a summer election may see months go by without such a meeting. Federally this usually is about a month after the new government is in place, or longer for out of season elections.
This, of course, is not the only way to do things.
In the Australia and New Zealand, the "caretaker" period of government is much more codified, and the UK concept of Purdah, also applies. Generally this encompasses the 6 weeks prior to an election, which is much much longer than in Canada.
The election period itself is typically a week or so shorter outside of Canada, but can be longer or shorter as well. The US in particular has no concept of a "writ period" and thus has no campaign length, with campaigning occurring nearly 24/7
Election day is similar in developed countries around the world, with polls being open for 12 hours, give or take a few hours, and closing at around 8pm, give or take a few hours. Results then generally come out quickly. The US, Australia, New Zealand, and Japan, for example, all count ballot booths individually, meaning results slowly roll in throughout the night, with the final result in each seat not being known for quite some time. The UK and Ireland however, use centralized counts. This means all ballot boxes are physically re-located to a central location within each seat, and counted as one. For this reason results in these countries only come out once per seat (compared to hundreds of times with more and more being known, in Canada etc) but are final once released. For this reason, elections in the UK are generally not "finished" counting until sunrise the next morning, whereas in the US/Australia/etc they are, as in Canada, generally "finished" by midnight local. Irish counts take a particularly long time, due to STV, with results of each round slowly rolling in over the following day or two, with no "election night results" in the same way as is done in the other countries named.
Validation is wildly variant. In the UK and Ireland, validation takes place before results are announced, and any recounts happen on the night of the election. Announced results are final. In New Zealand, parties will wait sometimes for valid results before even beginning coalition negotiations, and this can take weeks. Additionally, unlike the UK, where postal ballots need to be received by election day to count, in NZ those sent by election day count, and thus more and more ballots can come in during the following weeks. In the US, for Presidential elections in particular, the schedule for validation of electoral votes is set in the constitution.
In most countries, a transition period after the election but before the government is sworn in, is common. The United States has such a period written in to the constitution, and is roughly 10-11 weeks long, give or take a few days. The UK has no such period, and by sunrise the next morning, a new Prime Minister is generally expected to take office, with the 5 day coalition negotiation period after the 2010 election being seen as exceptionally long. Normally a UK PM is sworn in alone and appoints their cabinet in the following few days. This contrasts wildly with parts of Europe. Belgium has taken over 540 days to transition to a new government, though this was an unusually long period of time, in Germany this period can be a month or longer as a standard matter of course, whereas in the Netherlands, a transition period of 3-4 months is not unusual.
Parliament then meets for the first time. In the UK this can happen as little as one week after the election, and while language barriers make this information difficult to find in some countries, it appears a 1-3 weeks after a new government being sworn in, is common, with Canada actually having one of the longer periods.