Definition 10.3 from PMA Rudin 
It's an excerpt from Rudin's book. I can't understand the following moments:
1) Why he considers  continuous function with compact support? Why compactness is so important? 
2) Why equation (3) has the meaning? Why $f$ is zero on the complement of $I^k$?
3) Why integral in (3) is independent of the choice $I^k$? It's not obvious to me.
Can anyone give an answer to my above questions? I would be very grateful.

Basically, the answer to 1) is that the Riemann integral is defined only on rectangles, so you need to be able to enclose the set of points $x$ where $f(x)\ne 0$ in a giant rectangle and then integrate over that rectangle. That's what he's doing with the integral over the $k$-cell $I^k$. I'm not sure what you mean by 2); the answer to 2) should be the answer to 3). Consider any two rectangles (or $k$-cells) containing the support of $f$. On any subrectangle contained in one of those rectangles but not in the other, we have $f=0$, so integrating $f$ over that subrectangle will give $0$.
