Thanks for the answer.
Now I see that the situation of both players being in check at the same time is impossible to happen in f.i.d.e. chess.
But, and for variants that because of their rules changes, allow the situation of both players being in check to happen, what would happen in this situation?
A player that becomes in check and cant get out of it would lose the game or he will only lose if the other player can capture his king?