If your connecting flights were booked on one ticket, on the same reservation, it’s known as a “married connection” in airline lingo. When you check in for your first flight, the check in agent *should* tag your bag all the way through to your final destination.
You should see your destination city code on your baggage tag, and in a smaller or different font, you will see your connecting city code. For example, if you are traveling from Toronto to Salt Lake City and making a connection at Chicago OHare, you will see SLC on your baggage tag, and in smaller or different font, ORD.
Nowadays, baggage tags are usually generated automatically by the airline reservation system, and the days of check-in agents tagging bags incorrectly are few and far between. It does still happen from time to time, so it is always wise to mention your final destination to the check-in agent.
Baggage tags now come with a bar code for major airports, and most airports have sophisticated scanning and routing technology on their baggage system that directs the bag toward the correct gate for loading. It sorts bags in the connecting city to the next flight, and to the baggage carousel in the final destination. Lost luggage occurs far less often now than in recent years.
Ideally, when you load your bag onto the conveyor belt, you should not see it again until your final destination, unless you need to clear customs. For example, if you fly from Toronto to Salt Lake City through Chicago, there is a US Customs and Immigration at Toronto so you are “pre-cleared” into the USA. You won’t need to pick up your bag until Salt Lake City.
If, however, you are traveling from Sudbury through Toronto to Las Vegas, you will have to retrieve your bag in Toronto, take it through US Customs with you, and then put it on another belt before going to your next gate. The last point on your itinerary before entering the US is where you will clear US customs.
On International flights, some countries have fast track systems for speedy connections. For example, depending on where you are coming from, if you are connecting through Amsterdam to an onward destination, you will not need to go through Dutch customs. In other countries, this is not the case – some are friendlier for connecting passengers than others.