One of the more convenient features Apple has put in OS X is its Expose view for showing all windows of an application. While the implementation of this view has changed a little, its utility has been fairly consistent, allowing you to use a swipe gesture or F-key press to see what windows you have open and switch between them.
One early option Apple adopted for invoking Expose view was to click and hold an application's Dock icon; however, this was replaced with a contextual menu option that persists through the most recent versions of OS X. While this menu contains entries for the application's current documents, which can be selected to bring the window to the forefront, it no longer invokes Expose view itself.
However, you can still trigger Expose for a program using the Dock. Simply place your mouse cursor over a Dock icon and then either scroll up, or swipe with the gesture you have configured for Expose view in Mission Control. Either of these will invoke Expose view for the application under your cursor, regardless of which program you have in the forefront.
Note that the Expose gesture will only work for applications, whereas another benefit of using the scrolling gesture is it will expand stacks that you have placed in the Dock. Additionally, note that this only works with trackpad gestures. While Apple supports binding the F-keys to invoke Expose view, pressing these will act on the foremost application, regardless of where your mouse is.
Despite these slight limitations, by using gestures in this manner you can use the Dock to quickly navigate your windows, without needing to switch applications and then invoke Expose on each.
Instead, you can simply move your mouse along the Dock, swiping down or using the scroll action to invoke Expose without affecting the foremost application.