Condo: unit in an apartment building that's owned by individuals, however the building and land is owned by HOA. Condo unit usually shares walls, ceiling and/or floor with neighboring unit. Condo also shares maintanance cost to common area, master insruance, electricity, heating, AC, and/or roof etc through HOA. Because so many things has to go through HOA, the chance of waste of HOA dues are greater.
Townhouse: unit that shares only side walls with neighboring unit. The building and land are owned by unit owner. Some townhouse HOA have minimal fees and enforcement of bylaws, but there are townhouse HOAs that are pesky.
Single Family Home: detached building surrounded by yard and/or driveway. SFH HOA gaining popularity in 1970's due to several factors, including land scarcity, EPA storm water retention requirement etc, that creates "common area" in newly developed subdivisions.
What I am saying is, condo HOA fee is usually high. Townhome HOA fees could be low, depend on individual HOAs. If you buy newer homes, you almost never can avoid HOA, even with SFH. So learn to live with it, find one that is cheap and gives you less trouble. You do research on neighborhood, HOA is a subject.