岩 is composed of 山 (mountain) and 石 (stone). 石 represents a stone that has fallen or separated from a mountain, as denoted by 岩.
Additionally, 岩 and 石 have similar meanings, both referring to hard masses of minerals, but 石 refers to smaller pieces, while 岩 indicates larger ones.