Almost everyone in Barcelona lives in an apartment (or piso). In fact, it is so common that you will usually hear people referring to their apartment as their ´casa´ which literally means house. Casa also translates as home, hence the common usage, but you will almost never hear a local speak of their ´apartment´ as such.
In the outerlying districts of Sarrià, Horta Guinardó and Nou Barris you may be able to find houses if you truly want one and are patient and diligent. Otherwise, you will more likely need to live outside of Barcelona proper, in one of the many pueblos (townships) that are satellites to the city.
If you are used to living in a house you may have initial reservations about giving up your space. In actuality, apartment living in Barcelona is easy to get used to and there are plenty of relatively spacious options. Unlike other major cities in the world, those living in Barcelona are easily able to find four or five bedroom apartments with two or three bathrooms at reasonable prices, more than enough room for the average family. (Bigger family apartments at an affordable price can sometimes mean having to sacrifice living in your first choice, of either location or home itself.) Apartment buildings very often come with communal pools (unless you live in one of the inner districts, where space is more limited) and parking. Also, depending upon your location and district, you may have access to a doorman, which provides an extra service.