The 4 or 6 digit codes are either assigned by a governmental organization or a database publisher. They will allow you to find articles in various databases or compile a list of companies/competitors in the same industry. Companies either manufacture items such as automobiles or provide services such as banking. Each of these has a unique code.
If a database allows, please use the primary code assigned to a company. This is the main business/industry a company will be in, as many companies may be in a wide variety of industries. These other businesses will be their secondary industry codes. The NexisUni Database does an especially good job of assigning the primary and secondary codes for a company.
Standard Industrial Classification (S.I.C.) codes -a 4 digit system which is older but still widely used.
North American Industrial Classification System (N.A.I.C.S) -newer 6-digit system which allows a finer definition of the industry/industries