In layman's terms, the barcode serves as an ID of each and every product in the store. This is the link between the selling operations, merchandising, and accounting. The diagram below shows you events that will happen as an item is scanned.
You might be wondering how those lines and numbers work in the barcode. The lines would be the symbols readable by the optical scanner which then converts it to its ID or the SKU (Stock Keeping Unit) which is the term called for those numbers.
Thanks to Scott Blake at barcodeart.com here is a diagram that will show you how the barcodes work.
Left Hand Guard Bars - These bars serve as a starting reference point for the scanning devices.
Number System Character - This digit identifies the type of manufacturer or how the barcode will be used.
For example 0, 6, and 7 are generally used in the retail industry, while 3 is assigned to the health and drug manufacturing industries.
Number System Bars - These bars correspond to the Number System Character.
Manufacturer ID Number - Each company must apply for a Universal Product Identification Number with the Uniform Code Council. The UCC assigns each company a unique six digit identification number for use on all of their products. The number is composed of the Number System Character and a five digit manufacturer's code.
Manufacturer ID Bars - These bars correspond to the Manufacturer's ID Number.
Tall Center Bar - These bars serve as a middle reference point for the scanning devices.
Item Number - Each company is responsible for assigning a unique five digit number to each of their products.
Item Bars - These bars correspond to the Item Number.
Modulo Check Character - This digit is derived from a mathematical formula based on the unique set of numbers in each barcode that helps ensure the accuracy of the data scan.
Modulo Check Bars - These bars correspond to the Modulo Check Character.
Right Hand Guard Bars - These bars serve as an ending reference point for the scanning devices.