It depends on if you pre clear US Customs and Immigration before you depart Canada. If you do, then they will bring you in at a regular terminal and you can proceed to connecting gates with little problem. If you need to go through customs upon arrival, you will go through quarantined processing areas first, then transfer to whatever terminal your connection is located.
One other point, if you are transferring from a larger aircraft (Airbus for eg.) to a smaller commuter flight (Emberar) or vice vresa you will have to switch terminals anyway. Look for a shuttle bus thay runs from one concourse to another. It will save about a mile of walking.