I've always considered muffins more "breadlike" and cupcakes more "cakelike". Cupcakes are more of a snack or dessert food, though you are right, they can be made in so many different variations that it can be hard to discern.
I'm sure one of the bakers here can further explain, but that's how I've always seen the difference.