A modern EANbarcode: The parts in green are called spacers: They separate the groups of numbers. Each number is coded by 7 bits, as shown. The first 11 digits carry the product number. The final digit, in this case the number "2", is the checksum. The checksum is added so that the sum of the even positions, and that of the odd ones multiplied by three, modulo 10 is 0.
A checksum is a number. It is a kind of redundancy check. There are different ways to calculate it. It serves as a check, that no errors have been made when writing down the number. In its simplest form, the digits are simply added up. This can however not detect errors of swapping digits around. One of the uses of checksums is to check that account numbers have been entered correctly.