English numerals and demonstratives directly qualify countable nouns, for example, five books, three cars and this student. However, Chinese numerals, demonstrative pronouns such as 这 (this) and 那 (that) and interrogative pronouns such as 哪 (which) and 几 (how many) cannot directly qualify nouns without a grammatical element between them. English also has uncountable nouns such as air, water, steel, tea, meat and so on which cannot be directly qualified by numerals. For example, it is ungrammatical to say an air, two waters, and one hundred steels instead of a puff of air, two bottles of water and one hundred tons of steel. Chinese nouns resemble English uncountable nouns in that they need a grammatical element to link them to the numeral. Moreover, Chinese nouns also need such an element to link to demonstrative and interrogative pronouns. This grammatical element is called a measure word.
There are two types of measure word: standard measures and classifying measures.
“Standard measure words express universally accepted concepts of measurement on the one hand and packaging, grouping and partitioning on the other.” (Yip and Rimmington 2004, p.27). For example, 十里路 (ten miles), 一杯茶 (a cup of tea), 一群孩子 (a crowd of children).
Classifying measures “are not measures in the real sense of the word, but indicators of prominent features which can be attached to a particular set or class of nouns. That is why they are sometimes called classifiers by some grammarians.” (Yip and Rimmington 2004, p.27). For example, 四本书 (four books), 三条鱼 (three fish) and (a knife).
One must memorize the measure word along with the noun it matches just as one would have to do when studying some English nouns and measure words, such as a flock of birds, a band of horses, a pack of wolves, etc. One may not say, for example, two gangs of bread, a loaf of furniture or three flocks of pigs.
There is a generic measure word, 个 (usually read in neutral tone), but it does not go with every noun. If you forget the measure word of a noun or simply don't know the measure word of a noun, you can try 个 and you will luck out sometimes.