When you purchase a connecting flight, checked baggage is usually forwarded to your final destination, and will change planes when you do. The check-in agent will usually ask if you want your luggage checked through to your last stop, ask if they don’t to be sure. You’ll also receive boarding passes for both flights when you first check-in, so all you will need to do is find your gate at your connecting airport and your bags will automatically follow.
When you purchase a layover flight, you will need to claim your bags when you land at your layover destination. Then recheck them the next day when you continue your flight(s).
If you happen to purchase an itinerary where multiple carriers are involved, ask the check-in agent if your baggage will transfer. In some cases if you purchased multiple tickets that are not all on the same carrier you may need to recheck your baggage. To be certain, call the airlines you are traveling on and double check.