The entirety of the structure and grounds of a condo is typically owned by the unit owners. The difference is that the structure and grounds are owned in community, rather than each individual unit owner owning a specific bit of the structure or a specific bit of the grounds. There isn't some government agency, or some multinational mega-conglomerate that owns the building and land -- each unit owner is part-owner, and owns pretty-much just as much as anyone else.
There are no practical differences betwen owning a detached condominium versus an attached condominium, except for the obvious: You don't have a wall, ceiling or floor on the other side of which is a neighbor. As with any condominum, certain aspects are LCEs (as outlined above), and with detached condominiums there tend to be a bit more LCE space than with attached condominiums, but that's just a reflection of geometry: There are some attached condominiums with some serious LCE space. At the condo we lived in in Howell, you could have a "back yard" practically the same dimenstions as your townhouse. Wood, chain-link and vinyl fences were prohibited, but those that took advantage of that benefit were happy enough to enclose their yard in thick evergreens. It was wonderful.
Just a note about the conflict between the "box of air" comment above, and the "paint on the walls" comment, above: I'm pretty sure that the latter is more accurate, in practically every state. I don't know of any condo that restricts inside paint colors (which is the only rational practical difference between the two comments).
Condominiums have sometimes been poor investments (I sold one at $40,000 less than I bought it for) and excellent investments (even in this incredibly horrible housing market, we could sell the condo we're in now for over $100,000 more than what we paid for it). However, remember, you're buying a home, not a financial vehicle. Buy a condo, specifically, because you prefer living in a condo, i.e., having an association that provides community amenities, exterior up-keep, etc., and asserts minimum aesthetic standards for the exterior spaces.