Same as the difference between a head of cabbage and a toothpick.
They're two entirely different concepts.
A condo is a legal structure. It describes what you own. In a condo, you own everything within the four walls of your unit. Anything outside is a common element, owned by the condo association.
A townhouse or town home is a physical structure. It describes a multi-story residence in which typically one family--though sometimes two--lives.
The two have nothing to do with each other. A townhouse could be a condo, or not. A condo can be a unit in a large building, a townhouse, or even a single-family home.
Hope that helps.