Hold Ctrl key and click on each open programs button on the taskbar, Once you have selected the program buttons that you want to close right click on one of selected button and select Close Group.
There are also some other options like Cascade, Minimize and Tile Horizontally / Vertically