Convolutional codes are a type of error-correcting code used in digital communication systems to improve the reliability of data transmission by adding redundancy. They work by encoding input data into output sequences using a shift register and a set of generator polynomials, allowing for efficient error detection and correction through algorithms like the Viterbi algorithm.