Townhouse are like individual houses all joined together side by side. It can be 3-10 units per single building - just depends on the layout. They are individual living units so you don't have roommates (unless you advertise for one), however your wall can be the other side of your neighbor's wall, just like in an apt. The front yard is usually pretty nonexistent and the backyard size varies, but will be as narrow as the townhouse front/back as there are no side yards (the units touch - share a wall). You are usually responsible for the upkeep/mowing of your own yard.
Condos are more like an apt., only you own it.
Owners' associations can be a royal pain so read the fine print thoroughly and be sure you understand it. Many require strict conformity (you are restricted to what color the unit may be so it doesn't stand out garishly from the rest, what shade stain can be used on decks & fences [if they are permitted] or if chain-link is required, etc.). Many have strict noise ordinances, some do not allow flagpoles, all are crazy over assigned parking (what causes most discord, especially during holidays) and many do not allow pets. Some forbid shade umbrellas and awnings and I've seen one that forbid anything to be draped on a railing or fence (such a rug for drying, etc.). Be sure you note what they consider "a public eyesore."
It's like renting an apt. - you really can't just "do what you want." The association pretty much regulates what you can and can't do, but you own it and are responsible for upkeep. If you have a home repair that is needed or unsightly, they'll hit you with a time limit in which to have it completed and tack on fines if it's not accomplished expediently and to their satisfaction.
If your dog is a barker, or a fence hopper, this is probablly not a good choice for you.
Good luck, whatever you decide.