To cheat is to be dishonest in order to win or do well.
They cheated on the test by sharing answers.
Example picture