Can someone please explain second-order stochastic dominance?

If we have two gambles/lotteries, suppose A and B, and if we're looking at their cumulative distribution functions, why should the integral of B be greater than that of A, for A to have second-order stochastic dominance over B? I just don't understand how risk corresponds to these integrals