Sampling always starts with a population. Population is the complete set of all the things that are being studied.
Typically, we use the population of the United States, the population of the world, or the population of a state to be the population that we wish to generalize our findings to since examining all members of a population may not be feasible. This method, examining all members, is called a census. Hopefully, a group of people can represent the population.
Since the group of people from the United States seems like too big of an example, a smaller example of billiard balls will be demonstrated. As you see in the image below, the complete set of things in this particular example are the 15 billiard balls on a pool table.
With a group so small, it's possible to take all of them and define some attribute of them like color, or weight, or what have you--whether they're striped or solid, there are lots of different ways that you could describe each pool ball. And it's easy enough just to take the entire population and examine all of them.
When you think about the United States example, you can see that it's not really always feasible. Suppose your population is a large group of people, much larger than 15 people. It's kind of a big group, and it might be hard to get answers from everybody.
What you might choose to do is take a small subset of those individuals and make a sample. In this case, perhaps seven of these many individuals in the population were chosen. A sample is a subset of the population and you would obtain data from that subset and leave everyone else out.
From that sample, you would obtain your data and calculate your statistics. The idea is hopefully you would like the sample to be a small version of the population. A microcosm of the population, such that when you calculate your statistics from the data we obtain from the sample, it's about the same as what we would have gotten if we had measured the population directly. That's what we mean when we say that we want the sample to be a representative sample of the population.
There are certain ways that you can guarantee that a sample will be representative. One way is to take the entire population and put them in a hat.
Now again, this is a lot easier with billiard balls then it is with people. But imagine putting all the billiard balls into the hat.
Let’s say you shake up the hat, and take out a sample of five.
There are certain ways to guarantee that you won't get a representative population. Suppose I specifically cherry picked only solid colored billiard balls. Well, that wouldn't be very representative of the population of 15.
Source: this work is adapted from sophia author jonathan osters.