Almost always, the entire population of interest cannot be studied, so a sample (a subset of the population) must be studied. Samples can be random samples or non-random samples. Conclusions made from random samples can usually be generalized to the population (that is, they are externally valid).
Random sampling methods include simple random samples, systematic samples, stratified samples, cluster samples and multi-stage samples. Random samples are likely to be externally valid. Non-random sampling methods include convenience samples, judgement samples and self-selecting samples.
Random samples are often very difficult to obtain, so the best we can do is to aim for reasonably representative samples, where those who are in the sample are unlikely to be different than those who are not in the sample. Non-random samples may not be externally valid.
The following video may be helpful.