As long as your flight is all one ticketed reservation though one airline's website (could include partner airlines) then your luggage will usually be transferred for you. If you have separate tickets for different legs, or purchase a multi-airline ticket through a consolidator like Expedia or Kayak, then you may have to retrieve your luggage and go through security again, etc. I advise to book directly on the airline's website and NOT through a consolidator. The consolidator may be cheaper, but if there's issues, you have to go to them, you generally can't get the issue addressed by the airline.
If, coming home, you are changing planes in the USA, you MAY have to grab your luggage at your first airport in the USA and take it through customs and then re-check it in. But that will all be handled internally, you won't have to go back out into the main airport. You need to ask the agents when you check in how it will be handled
Stay far, far away from Air Canada unless you have no other choice! They are awful, and their planes frequently end up being Air Canada Rouge planes which are small and cramped and just horrid. I'm flying them next month because they are the ONLY airline that worked for my Canadian itinerary. I never would have booked with them otherwise. And the final leg home from Halifax, I booked with Delta, as I had points, and the flight was better than Air Canada's (and NOT Air Canada!)
Sayhello