You want the sample to be representative. So for that to happen, there are a few mandatory conditions:
1. Since it's impossible to know what you do not observe, you want to use random sampling.
2. The sample must, also, be large enough so the effect of sampling error on the feature is relatively small.
If you're using R, you might find the following page useful: