The characters combine quite literally: “Things (物) according to (以) their type (类) gather together (聚).” This structure gives it a sense of being a natural law or an objective observation.
The concept of 物以类聚 is ancient, with its roots in the classic philosophical text, the *I Ching* (《易经》, The Book of Changes). The original, longer phrase is “方以类聚,物以群分” (fāng yǐ lèi jù, wù yǐ qún fēn), meaning “Objects are classified by type, things are divided by group.” This shows that the idiom isn't just a casual proverb but a foundational principle of Chinese thought about order in the universe.
物以类聚 is a very common idiom used in both formal writing and everyday conversation. Its connotation depends entirely on the context.