Yes there is a difference, detached literally means detached (no other home connected) as compared to a townhouse which might have homes sharing a common wall on one or both sides. There is also semi-detached where you have two homes that share one common wall.
Single familes homes are homes that are not attached to any other home. A semi-detached home is one that shares at least part but not all of a common wall. An attached home shares a complete common wall. It can get confusing.