Alot of it comes down to the batter as well. Most if not all cakes, cupcakes and muffins are 'quick' bread. IE use chemicals leaveners(ie cream of tartar, baking soda/baking powder)
Breaking down further, muffins generally are not mixed very much, so they have bigger and more irregular shaped gas bubbles, whereas cake is usually creamed and mixed alot resulting in smaller more equal shaped gas bubbles.
To simplify further, if you cross section a muffin it should have all sorts irregular holes, whereas if you cross section a cake it should be relatively small holes and very uniform.
Fun fact you probably didn't know: Pancakes and waffles are technically muffins.
If you are really interested about it, watch the Alton Brown Good Eats episode on Muffins, and then watch his episode on making a pound cake. Or you can read his book on baking too, breaks it down even further.
Oh and cupcakes get frosting, muffins get a glaze.