Normally you will need to pass the guaranteeing and custom check on your first landing, but sometime the carrier may allow you to leave the airplane without collecting your check-in luggage. It normally occurs when your next leg flight is on the same airplane. In that case your luggage will be collected on your final destination.
But, check with your carrier in advance is always a better idea.