It's easy.
"D" is the most efficienty (lowest RPM) mode. You could stay in D all the time if you wanted.
"S" tells the car to use a little higher RPM. If you give throttle while you're in S, you accelerate quicker/harder. If you are braking while in "S" the higher RPM/engine load helps slow the car down. It's like downshifting in this way.
"B" is the highest rpm setting we have. You can smash the gas while using B to accelerate or hit the brake to slow down.
Try it out... and you'll see exactly what I'm saying. On the highway I use "S" and some gas to catch up, merge...etc. And at quick stops I use S and B to help slow down... or to just slow down entirely without using my brakes.