In order to integrate a function over a complicated domain D, Monte Carlo integration picks random points over some simple domain D' which is a superset of D, checks whether each point is within D, and estimates the area of D (volume, n-dimensional content, etc.) as the area of D' multiplied by the fraction of points falling within D. Monte Carlo integration is implemented in the Wolfram Language as NIntegrate[f, ..., Method -> MonteCarlo].