It is used to describe the noun. For example, 一块蛋糕(a piece of cake), "块" is the measure word for cake.
There are more than 160 measure words in Chinese. Most of them can be collocated with most nouns.
一条鱼 a fish
一条河 a river
一条路 a road
一张纸 a piece of paper
一张床 a bed
一张照片 a photo
一座山 a mountain
一座桥 a bridge
一座楼 a building
一碗饭 a bowl of rice
一杯水 a cup of water
一房间书 a room of books
一升水 a liter of water
一公斤苹果 a kilo of apples
一公里路 a kilometer of road