The OS X Dock houses a number of powerful features, but one of the fun ones is the Dock Stack.
Per the document at https://support.apple.com/en-us/HT201955 :
If the act of clicking your Dock Stack like a caveman is too much effort for you, you can run this utility to enable scroll-wheel expansion of Dock Stacks. If you have a center scroll-wheel on your mouse, hovering over a Dock Stack and scrolling your wheel will let you expand or shrink the Dock Stack. If you're using a Magic Mouse, sliding your finger up on the mouse will do it too. Or a two-finger up-swipe on the Magic Trackpad. It just makes things ever so slightly faster and more convenient.