According the FIDE LAWS of CHESS:
3.9.2 No piece can be moved that will either expose the king of the same colour to check or leave that king in check.
So as @djnavas points out, if you are in check you have to do at least one of three things to get out of check (without placing the king in another check) to get out of check and continue the game:
- move the king out of check,
- capture the piece checking you, or
- block the check (by putting one of your pieces in between the king and the piece checking you).