Monte Carlo methods are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results, i.e. by running simulations many times in succession in order to calculate those same probabilities with machine learning just like actually playing and recording your results in a real casino situation: hence the name. Monte Carlo simulations are often the precursor to building machine learning algorithms for specific classes of problems.
Here is a good introduction to the subject of Monte Carlo methods posted on the Cartesian Faith blog: “Probability and Monte Carlo Methods.” This blog is a good one to follow for statistical theory and practice and is written by Brian Rowe, professor at the CUNY School of Professional Studies.
The article uses R for specific examples you can try on your own.