Is "on top of" physically above or very close to each other? I guess the latter.
ex)How do eight million people in New York function, live, work, and even thrive on top of each other? ...Whether they are from Ireland, Italy, West Africa,...it's that mix of people and cultures that has always been the city's most solid foundation and source of energy...
It's a hyberbole. The literal meaning of "on top of" is physically above. But the intended meaning here is "so close to each other that they must be (or might as well be) on top of one another."
It's common to say of people who live in cramped houses that they "live on top of one another."
http://en.wiktionary.org/wiki/live_on_top_of_one_another