If one of the fighters withdraws or is unable to compete before the fight begins, the bout will generally be cancelled. In that case, all bets placed on that fight will be voided, and your stake will be refunded to your account.
If the UFC replaces the fighter and the fight proceeds with a new opponent, bets placed before the change will typically be voided unless stated otherwise when markets are reopened.