A simple way to do this is a parity check. A parity check works by sticking an extra bit at the end of each signal.
There are two kinds of parity: odd and even. An odd parity means that the total number of bits that have a value of 1 in a signal, including the parity bit, must be an odd number. An even parity is just the opposite: the total number of "1" bits in a signal must be a positive number.
So the modem will count up the number of "1" bits in each signal. If the modem is communicating with even parity, and the total number of 1 bits in the signal excluding the parity bit is odd, the parity bit will be 1, thus making the total number of "1" bits even. If the total number excluding the parity bit is even, the parity bit will be 0. Odd parity works similarly.
Example: Our signal is 1100, and we are using even parity. Since there are 2 "1" bits, the parity bit will be 0. But if the signal was 1101, there are now 3 "1" bits, and the parity bit will be 1 to make the total number of "1"s 4.
The receiving modem will examing the signal. If it is communicating with even parity, then every signal will have an even number of "1" bits in the signal. Any signal that has an odd number of "1" bits will be rejected, and the receiver will ask that the signal be retransmitted.
This is by no means the only way of checking and correcting errors, but is the simplest.