Dating in its origins from the 2 millenium BCE and still inhabited by up to 40 million people today:
The first type of yaodong were underground dwellings that date back to the 2nd millennium BC, China's Bronze Age, and according to Chinese tradition, the Xia Dynasty. Chinese scholars generally believe that this type of habitat has developed mainly from the Han dynasty (206 BC to 220 AD), along with a progressive improvement of construction techniques to the dynasties Sui (581 to 618) and Tang (618 to 907). But it is during the dynasties Ming (1368 to 1644) and Qing (1644 to 1912) that the pace of construction reached its peak.


Source: Wikipedia – Yaodong
The number of 40 million is a quote from the Wikipedia page, which relies on:
In northern China, an estimated 40 million people currently live in cave homes known as yaodong. As the human population of the entire planet in 8,000 BC was probably only five million, there are eight times as many cavemen now than there were people of any kind then.
Source: "Where did Stone Age people live?" in: John Lloyd and John Mitchinson: "The Book of General Ignorance. The Noticeably Stouter Edition", Faber and Faber: Londom, 2010.
While the exact number of people living in these kind of structures may be hard to ascertain, the order of magnitude seems to check out:
Some 30 million Chinese still live in caves and over a 100 million people reside in houses with one or more walls built in a hillside. Many of the cave and hill dwellings are in the Shanxi, Henan and Gansu provinces. Caves are cool in the summer, warm in the winter and generally utilize land that can not be used for farming. On the down side, they are generally dark and have poor ventilation. Modern caves with improved designs have large windows, skylights and better ventilation. Some larger cave have over 40 rooms. Others are rented out as three-bedroom apartments.
Source: Facts and Details: Cave Homes and Ant People in China, that number is apparently based on: Ronald G. Knapp: "Chinese Landscapes The Village as Place", University of Hawaii Press: Honululu, 1992, p25.
A "Remarkable aerial pictures reveal China's 'invisible village' where local residents live in subterranean caves - a lifestyle they have kept for 4,000 years" (DailyMail.UK, 5 April 2016) for one conglomeration with 10000 homes:
