It's a very complex chemical process that occures in the bottle . . . and only in the bottle. Aging in a cask works differently and yields different results.
In beer and wine, it has to do with the fact that not all of the yeast is dead when the beverage is decanted. So some slow fermentation continues even in the bottle. Distilled spirits are dead: there's no yeast left alive. Still, many of the more complex alcohols will degrade with time into other compounds, changing the flavor of the whole.
Most wines don't benefit much from aging, but some, particularly the most complex reds, can benefit enormously. It's less true with whiskeys but it can indeed make a difference. If you're feeling flush, go into a very, very good bar sometime and order a shot of the Laphroaig 10 year old, then follow it with a shot of the 30 year old. Your questions will be answered, my son.