This is actually the main difference between a stopover and a layover.
A stopover is when there is an interruption in your travel, you get your checked luggage, exit the airport, usually spend a night or more in a hotel or elsewhere, then check in again when you resume your travel. The airline will tag your luggage with the stopover location as the final destination, you will usually only get boarding passes for the flights up to that point, and they will check you have the required paperwork to enter the country of the stopover.
A layover is the opposite: your luggage is transferred and you usually don’t even see it (with the usual caveats like at the first point of entry in the US). You are not really expected to exit the airport (though you usually can). Luggage will be tagged through to the final destination, you will often get all boarding passes, and they will check paperwork for entry into the final destination country, but only for transit for the layover point.
The usual criterion used is 24 hours between arrival and departure. Under that it’s usually a layover and above that a stopover.
A stopover also means that if there are operational issues and they have to reroute you, they will reroute you to the point of stopover, while for a layover they may simply change the itinerary and completely skip the layover point to get you to your final destination.
Basically a stopover breaks your trip in multiple parts exactly like the outbound and inbound parts of a return ticket.
Note that for many airlines, stopovers are not possible for all fares, and require more expensive fares. Other airlines on the contrary will encourage stopovers, usually in cooperation with local tourism authorities, with promotional hotel deals and the like.
Whether it’s a layover or stopover is usually determined at booking time. Check-in staff will often inquire to confirm what your final destination of the day is, but I’m not sure what flexibility they have in changing things (though this is probably quite variable depending on the airline, the fare and the actual time between flights).