This is where things get interesting.
In our building, most of the units are duplexes (an apartment on two floors with an interior stairway). Our particular apartment is all on one floor. That's a flat. You can't really call a unit like a duplex a 'flat' because it isn't flat.
Real Estate ads will mention if a unit for sale or rent is a conversion. Sometimes, they will specifically mention a 'Parlor Floor Conversion'. When a brownstone was first built as a single family home, the parlor floor was the formal section of the house. It usually had higher ceilings and more elaborate woodwork than the rest of the building. That often makes it more desirable as a conversion.
Back onto duplex, because the other defintions were so different for me.
In my area, I've always thought of a duplex as as a single house that is divided into two apartments and each has it's own exterior entrance. A triplex has 3 apartments and 3 separate entrances, and a quadplex has four. And most duplexes in my city are one story. There might be a few two story duplexes but they would usually be divided vertically so both have 2 stories and ground floor exterior entrances.
Here, most condos have some type of interior hallway that is used to access the apartment, but some have exterior entrances. The apartment owners do not own the land underneath and have less control over what changes can occur.
Patio home and townhomes here normally have shared walls, and small private patios. There is an association that owners pay dues to to pay for common areas, exterior landscaping and even things like repainting all of the exterior units. I always thought of patio homes being one story and townhouses being 2 but that could have been my quirk.
There is one area in our town with single story homes, with no shared walls and each has a very small garden. But they are marketed as condo's because the owners do not own the land and can not make changes to the exterior and they pay a high monthly maintenance cost of exterior landscaping and care.
Another popular type home here is a Zero lot line home. Basically, a single family residence with no shared walls but the home takes up most of the lot. There is also no common association.