Your ticketing arrangement matters more than most travelers expect. On a single booking, bags are usually checked through to the final destination and the airline owns the connection, so you can often stay airside and avoid entering the transit country at all. On separate tickets, you almost always have to clear immigration, collect bags, and check in again, which means you need whatever visa a normal visitor would.
Switching airlines matters mainly through baggage. Alliance partners and carriers with interline agreements can often through-check bags across bookings if asked at check-in, though they are not obliged to. Two unrelated low-cost carriers generally will not, forcing you landside.
There is a documentation angle too: with separate tickets, the first airline assesses your eligibility for the connecting point as if it were your destination and can deny boarding if you lack the right to enter it. If you build a multi-ticket itinerary yourself, verify transit rules for every stop as though visiting each one.