Properly speaking, Fubini's theorem relates to the measure theoretic integral, not the Riemann integral commonly taught in undergraduate Mathematics curricula. The Riemann-integral equivalent is essentially that given above; however the conditions attached to changing the order of integration are truly horrific. As usual, the "real" integral does it in a much neater (and more intuitive, outrageously enough!) manner.

The theorem proper explains how (and when!) to convert integrals by some product measure to an iterated integral by each component in turn. I'll be using dx×dy as my product measure, with dx and dy as the components. This is more convenient for those accustomed to using Lebesgue measure, and will also appear familiar to people who know Riemann integrals. Note, however, that the theorem applies equally well to the product of any two measures.

Theorem. Let f(x,y) be an integrable function according to the measure dx×dy. Then for almost any value of y,
I(y) = ∫ f(x,y)dx
exists. Furthermore, I(y) is itself integrable and
I = ∫ f(x,y) dx×dy = ∫ I(y) dy = ∫ (∫ f(x,y) dx) dy.
By switching x and y and noting we still get I, we get the lax formulation:
Corollary. If f(x,y) is integrable then
∫ (∫ f(x,y) dx) dy = ∫ (∫ f(x,y) dy) dx.

Note the simple condition for switching order of integration: the function must be integrable as a function of 2 variables. This is (unfortunately for people who don't use it) only true for the Lebesgue integral.