For your luggage - if it's through checked (to your final destination) the airline that flies you to your final destination is responsible for the delivery of it.
For yourself - if the airline checks you in for the connecting flight, even if it is not on the same carrier, they are responsible to get you to your connecting flight or get you to your final destination. If they do not check you in, that's another story ...