When you have a flight booked under the same trip, it’s the airline’s responsibility to find an alternative option. If there are no immediate flights available and the next flight out is the next day, they can rebook you for a different airline. If that is not possible either, they should cover your accommodation at the hotel for the night.
Sometimes, circumstances outside the airline’s control can cause you to miss your flight, reaching your destination with a delay longer than 3 hours. These circumstances are often referred to as “extraordinary,” although it’s worth checking whether or not that was the case first.
Things get slightly more complex when the flights are booked separately. While they may rebook your flight as a token of goodwill, they are not legally obligated to do so. Most of the time, you’ll have to rebook the flight yourself, paying an extra rebooking fee.