Barcodes come in two varieties: linear and 2D. Linear barcodes are printed with lines of varying widths and spaces, while 2D barcodes use a grid pattern to encode data that can be scanned for both barcode printing and scanning purposes. Both types are widely used in retail operations, but the capacity of information they can store differs greatly.