Have you ever lived in an apartment, it's usually a self-contained housing unit but it only occupies a part of a larger building.
I have always lived in a house. I am not familiar with living in an apartment.
They usually call these apartment buildings or even a complex.  In Britian they are called a block of flats.  It's not always the greatest to live in them, but economical