The North American Industry Classification System (NAICS) is a list that groups similar businesses together and assigns a number to each category. The U.S. government uses these classification codes to organize data collected about various industries.
Some Library databases, such as D&B Hoover's, can be searched by NAICS code, so it may help you to see an example of how the numbering system works. Let's use soft drinks as our sample search.
Soft drinks fall under the category of "Beverage Manufacturing," which is one segment of the larger category Manufacturing (Sector 31). Everything listed under this large category begins with the digits "31." Here's how the categories look in D&B Hoover's: