What happens if you make an illegal move (like bringing the king to check) in a regular chess match and chess competition?
It depends on the time control. In a classical game, the arbiter would be called over and time added onto the clock of your opponent. In a blitz game, an illegal move ends the game instantly.
There is an infamous example of the latter at the World Rapid and Blitz Championships a few years ago when a kid made an illegal move against Magnus, he did not call him on it and played his next move (in a completely winning position) and the kid called the arbiter over and tried to make a claim that he won the game as Magnus' move was illegal since his own previous move was illegal (obviously, that did not hold up).
I actually think they changed the blitz rules in 2018 so that instead of instantly losing after an illegal move, it is a 1-minute time penalty. See Article 7.5.5 and B.2.
https://handbook.fide.com/chapter/E012018
What happens if you make an illegal move (like bringing the king to check) in a regular chess match and chess competition?
It depends on the time control. In a classical game, the arbiter would be called over and time added onto the clock of your opponent. In a blitz game, an illegal move ends the game instantly.
There is an infamous example of the latter at the World Rapid and Blitz Championships a few years ago when a kid made an illegal move against Magnus, he did not call him on it and played his next move (in a completely winning position) and the kid called the arbiter over and tried to make a claim that he won the game as Magnus' move was illegal since his own previous move was illegal (obviously, that did not hold up).