You purchase travel insurance for international trips through an insurer in your country of residence, which means the country to which you'd want to be evacuated to or return to after a serious medical emergency and/or the country you'd need to travel to if a family member became very ill (these are assumed to be the same country).
If travelling within your country of residence, you can buy cheaper domestic travel insurance within that country, but you may decide that you do not need it at all if you are willing to risk losing costs associated with cancellations and so on. This may be true especially for Canadians travelling to the US where more options may be available after having crossed the border.
You can obtain travel insurance through your travel agent, your normal insurers, or any one of a number of specialist travel insurers. Travel agents sometimes selloverpriced policies as you are something of a captive audience. Shop around. Because travel insurance policies are somewhat interchangeable, there are a number of websites where you can compare policy costs. This article does not list specific insurers as they are both numerous and country-specific where based.
Sometimes you may be insured via an existing deal. Some credit card companies insure any trip you take as long as you buy the tickets on a particular credit card. Business travellers may be covered by a company-wide insurance policy, but if you intend to take any sides trips or have a personal holiday, check the coverage: usually personal holidays on the side must be of a fairly short length to be covered by a business policy. Be sure to check any "existing deal" carefully and ideally get confirmation in writing of your coverage. Credit card insurance deals, for example, often offer just basic coverage, and may be invalidated for travelers who paid travel deposits in cash rather than using the card.
If a member of a travel association or large professional group, you may find that it offers or endorses an insurance provider that provides extra coverage or better rates. Failing that, you may find coverage through on-line search. But take care that the company has a good reputation, e.g., from friends/family that have had to file claims, or local travel agents (mere on-line reviews/ratings may not be genuine).
Very regular travellers may find that "ongoing" or "periodic" travel coverage, typically purchased a year at a time, can be cheaper than insuring each trip individually. Most major travel insurers offer such policies. Large businesses often purchase such coverage for their key or frequent travelers.