As someone who has intimate knowledge of the second largest retailer in the world, I can tell you it's a mixture.
Basically you have food and non-food items. Food items that are weighed in-store for example can be given a barcode which starts with an in-store prefix, other food items contained in tins have a barcode that the manufactures have assigned following certain conventions (country of origin etc..) food created in-house gets yet another barcode because it may be produced from tinned food that is also sold on shelves. I could go on...
Non-food stuff tends to be packaged already and the barcodes are supplied by the manufacturer sometimes conforming to the recognised format sometimes based on their own product reference.
You can get software that generates a barcode depending on the information you want to encode, and it'll do it according to the recognised standards, but your data is your own.
The EAN Code is the most widely known code in Europe, but there are also Book codes ISBN and periodical codes... OK enough already!