They are called "shophouses." They were built decades ago. At that time, families lived on the 2nd and 3rd floor, and had a shop on the 1st floor (the Ground floor).
Now, few people live in these old buildings, but they are refurbished and renovated, and now they have only shops. It's a great way of preserving the city's history.
Nowadays, most Singapore people live in houses or apartments or condominiums.