Statistical sampling is a broad field, but in applied machine learning, you're more likely to employ one of three types of sample: simple random sampling, systematic sampling, or stratified sampling. Simple Random Sampling: Samples are selected from the domain with a uniform probability.
Random, systematic, convenient, cluster, and stratified sampling are the five types of sampling.
We could select a sample method based on whether we want to account for sampling bias; for this reason, random sampling is frequently recommended over non-random sampling. Simple, systematic, stratified, and cluster sampling are all examples of random sampling.
In order to execute sampling, you must first specify your population and the technique for selecting (and sometimes rejecting) observations for inclusion in your data sample. The population parameters that you want to estimate with the sample may very well specify this.
In machine learning, sampling is useful because, when done correctly, it can yield an accurate, low variance approximation of some expectation.