At Calgary airport, passengers connecting between two international flights can usually stay in the transit area without going through immigration. If you connect from an international to a domestic flight, you enter the country here: you go through immigration and collect and re-check your bags.
The airport has 3 terminals or concourses (Domestic terminal (Concourses A, B, C), International terminal (Concourse D, international), International terminal (Concourse E, US flights)). All of them are connected after security, so you do not need to clear security again to change.